*{
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}
body{
    font-size: 22px;
}
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color:rgb(249, 249, 249);
    padding: 20px;
}
 /* .l-side{
    width: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}  */

.logo-container {
    text-align: center;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

    .login-form {
        width: 100%;
        max-width: 620px;
        background: #ffffff;
        border-radius: 20px;
        box-shadow: 0 6px 16px rgb(102 97 97 / 8%);
        padding: 30px;
    }

.register-form{
    width: 100%;
        max-width: 620px;
        background: #ffffff;
        border-radius: 20px;
        box-shadow: 0 6px 16px rgb(102 97 97 / 8%);
        padding: 30px;
}

.register-form h2 {
    text-align: center;
    margin-bottom: 2px;
    color: #000000;
    font-weight: 500;
    font-size: xx-large;
    margin-top: 12px;
}

.register-button {
    background-color: #000000;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    margin-top: 20px;
    margin-bottom: 20px;
    margin-left: 220px;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 24px;
    color: #000000;
    font-weight: 500;
    font-size: xx-large;
    margin-top: 12px;
}
/* .login-form > span{
    background-color:rgb(255, 255, 255);
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2px 14px;
    margin: 10px 0;
}
.login-form > span > input{
    background-color:rgb(255, 255, 255);
    border: none;
    width: 300px;
    height: 50px;
    font-size: 20px;
    color: #1C1C1C;
    font-weight: 500;
    margin-left: 10px;
    outline: none;
}
.login-form > span > input:focus::placeholder {
    color: transparent;
  }
.login-form > span > input::placeholder{
    color: #383737;
    font-weight: 500;
    
} */
.login-button {
    background-color: #000000;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 15px 100px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    margin-top: 15px;
    margin-bottom: 15px;
    margin-left: 140px;
}

.login-button hover{
    background-color: #333333;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}
.form-group label {
    font-size: 17px;
    font-weight: 500;
    color: rgb(15, 12, 12);
    margin-bottom: 5px;
}
.form-group input {
    padding: 12px 16px;
    border: 1px solid #d1d1d1;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

p.text-center {
    padding-left: 140px;
}
.box{
    width: 412px;
    height: 524px;
    border-radius: 46px;
    box-shadow: 0 0 1rem 0 rgba(0, 0, 0, .2); 
    background-color: rgba(255, 255, 255, 0.274);
    backdrop-filter: blur(13.6px);
    z-index: 2;
}
.box > h2{
    color: #fff;
    width: 260px;
    padding: 20px 40px;
    line-height: 50px;
    font-weight: 600;
   
}
.box > img{
    position: absolute;
    bottom: 0;
    right: -55px;
    width: 700px;
}
.layer{
    min-height: 100vh;
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    background-color: #ffffff38;
    z-index: 1;
}
@media screen and (max-width: 1048px) {
    .box > img{
        right: -10px;
        width: 550px;
    }
}
@media screen and (max-width: 860px) and (max-height: 1024px) {
    .r-side{
        display: none;
    }
    .container{
        justify-content: center;
        align-items: center;
    }
}
.light{
    width: 80px;
    height: 80px;
    background-color: #fff;
    position: absolute;
    bottom: 100px;
    left: -40px;
    border-radius: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.light > img{
    width: 50px;
    transition: .2s;
}
.light > img:hover{
    width: 60px;
}
.message {
    margin-top: 10px;
    font-weight: 600;
    font-size: 10px;
    min-height: 20px; /* so space is always reserved */
  }
  
  .message.success {
    color: green;
  }
  
  .message.error {
    color: #FF3333;
  }
  /* .goai-logo-side {
    display: flex;
    justify-content: center;
    align-items: center;
  }
   */
  .goai-logo-side img.goai-logo {
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    display: block; /* prevents the bottom whitespace from inline images */

  }

.text-center a {
    color: #ff0023;
}/* === Sidebar Wrapper === */
.sidebar {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 2px 0 15px rgba(0, 0, 0, 0.08);
  border-right: 1px solid #e5e7eb;
}

.sidebar.open {
  width: 300px;
}

.sidebar.collapsed {
  width: 30px;
  background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
}

/* === Toggle Button === */
.toggle-button {
  position: absolute;
  top: 15px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 30%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.toggle-button:hover {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* === Logo Section === */
.sidebar-photo {
  text-align: center;
  padding: 20px 0 15px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-bottom: 1px solid #e5e7eb;
}

.logo {
  width: 140px;
  height: 50px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* === Sidebar Header === */
.sidebar-header {
  padding: 20px 24px 16px;
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  border-bottom: 1px solid #e5e7eb;
}

.chat-options {
  margin-bottom: 0;
}

.chat-options h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: #111827;
  text-align: center;
  letter-spacing: -0.025em;
}

/* === New Chat Button === */
.new-chat-container {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.new-chat-btn {
  width: 100%;
  background: linear-gradient(135deg, #1f2937 0%, #1f2937 100%);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(55, 65, 81, 0.3);
}

.new-chat-btn:hover {
  background: linear-gradient(135deg, #d20000 0%, #bc0000 100%);
  transform: translateY(-2px);
  /* box-shadow: 0 8px 20px rgba(220, 38, 38, 0.4); */
}

.new-chat-btn:active {
  transform: translateY(0);
}

/* === Search Bar === */
.sidebar-search {
  position: relative;
  margin-bottom: 0;
}

.search-input-wrapper {
  position: relative;
}

.sidebar-search input {
  width: 100%;
  padding: 10px 40px 10px 16px;
  font-size: 14px;
  background-color: #ffffff;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-sizing: border-box;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sidebar-search input:focus {
  /* border-color: #dc2626; */
  background: #ffffff;
  outline: none;
  /* box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1); */
}

.sidebar-search input::placeholder {
  color: #9ca3af;
}

.clear-button {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #6b7280;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.clear-button:hover {
  color: #dc2626;
  background: #fee2e2;
}

/* === Scrollable Area - Integrated Look === */
.sidebar-scrollable {
  flex: 1;
  overflow-y: auto;
  padding: 0; /* Removed padding to integrate with sidebar */
  background: #ffffff; /* Unified background with sidebar */
  border-top: 1px solid #e5e7eb; /* Subtle separation from header */
  border-bottom: 1px solid #e5e7eb; /* Subtle separation from footer */
  scrollbar-width: none;
  scrollbar-color: #d1d5db #ffffff;
}

.sidebar-scrollable::-webkit-scrollbar {
  display: none;
}

.sidebar-scrollable::-webkit-scrollbar-track {
  background: #ffffff;
  border-radius: 3px;
}

.sidebar-scrollable::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #d1d5db 0%, #9ca3af 100%);
  border-radius: 3px;
}

.sidebar-scrollable::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #9ca3af 0%, #6b7280 100%);
}

/* === Section Styles === */
.sidebar-section {
  background: transparent;
  border: none;
  margin: 0;
  box-shadow: none;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-section:hover {
  background: rgba(220, 38, 38, 0.05);
  transform: translateY(-1px);
}

.sidebar-section svg:hover {
  background: transparent;
}

/* === Section Headers === */
.files-section-header,
.prompts-section-header,
.conversation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: transparent;
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.3s ease;
  height: 40px;
}

.files-section-header:hover,
.prompts-section-header:hover,
.conversation-header:hover {
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.files-section-header .header-left svg,
.prompts-section-header .header-left svg,
.conversation-header .header-left svg {
  flex-shrink: 0;
}

.files-section-header h3,
.prompts-section-header h3,
.conversation-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  letter-spacing: -0.025em;
}

/* === Add Icons === */
.add-icon {
  color: #6b7280;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 6px;
  border-radius: 6px;
  background: transparent;
}

.add-icon:hover {
  background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%);
  transform: scale(1.1);
}

.add-icon.disabled {
  color: #d1d5db;
  cursor: not-allowed;
  background: transparent;
}

.add-icon.disabled:hover {
  transform: none;
  background: transparent;
}

/* === Section Content === */
.section-content {
  max-height: 300px;
  overflow-y: auto;
  padding: 0; /* Removed padding to integrate with sidebar */
  margin: 0;
  background: #ffffff; /* Unified background */
  border-radius: 0; /* Removed border radius for seamless integration */
  box-shadow: none; /* Removed shadow for integration */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.section-content::-webkit-scrollbar {
  display: none;
}

.section-content.collapsed {
  display: none;
}

/* === Item Styles with Left Content and Right Actions === */
.section-content .file-item,
.section-content .conversation-item,
.section-content .prompt-item {
  padding: 8px 12px;
  margin: 4px 0;
  border-radius: 6px;
  background: #f9fafb;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  justify-content: space-between; /* Space between content and actions */
  align-items: center;
  font-size: 14px;
  color: #374151;
  height: 40px;
  cursor: pointer;
  text-transform: capitalize;
}

.section-content .file-item:hover,
.section-content .conversation-item:hover,
.section-content .prompt-item:hover {
  background: #f3f4f6;
  transform: translateX(2px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Selected state with only left border */
.section-content .file-item.selected
{
  border-left: 4px solid #dc2626;
  background: #E5E7EB;
}

.section-content .prompt-item.selected {

  border-left: 4px solid #7c3aed;
  background: #E5E7EB;
}
.section-content .conversation-item.selected{
  border-left: 4px solid #374151;
  background: #E5E7EB;
}

.file-item {
  border-left: 4px solid #606060;
}

.conversation-item {
  border-left: 4px solid #606060;
}

.prompt-item {
  border-left: 4px solid #606060;
}

/* Item Content (Left-aligned) */
.section-content .file-item .item-content,
.section-content .conversation-item .item-content,
.section-content .prompt-item .item-content {
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Right-aligned Actions */
.section-content .file-item .item-actions,
.section-content .conversation-item .item-actions,
.section-content .prompt-item .item-actions {
  display: flex;
  align-items: center;
  gap: 8px; /* Space between date and buttons */
}

/* Conversations Section - Date Styling */
.section-content .conversation-item .conversation-date {
  color: #c1c1c1; /* Different color for date */
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  display:block;
}

/* Files Section - Delete Button */
.section-content .file-item .delete-button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.3s ease;
  color: #6b7280;
  margin: 0;
}

/* Prompts Section - Edit and Delete Buttons */
.section-content .prompt-item .edit-button,
.section-content .prompt-item .delete-button {
  display: flex;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.section-content .prompt-item:hover .edit-button,
.section-content .prompt-item:hover .delete-button {
  opacity: 1;
}

/* Item Icons */
.section-content .file-item::before {
  content: "📄";
  margin-right: 8px;
  font-size: 16px;
  color: #dc2626;
  background: transparent;
}

.section-content .conversation-item::before,
.section-content .prompt-item::before {
  content: "";
}

/* Edit and Delete Buttons */
.section-content .file-item .edit-button,
.section-content .conversation-item .edit-button,
.section-content .prompt-item .edit-button,
.section-content .file-item .delete-button,
.section-content .conversation-item .delete-button,
.section-content .prompt-item .delete-button {
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.section-content .file-item:hover .edit-button,
.section-content .conversation-item:hover .edit-button,
.section-content .prompt-item:hover .edit-button,
.section-content .file-item:hover .delete-button,
.section-content .conversation-item:hover .delete-button,
.section-content .prompt-item:hover .delete-button {
  opacity: 1;
}

.edit-button,
.delete-button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.3s ease;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
}

.edit-button {
  color: #1e40af;
}

.edit-button:hover {
  color: #1e3a8a;
  transform: scale(1.1);
}

.delete-button {
  color: #dc2626;
}

.delete-button:hover {
  color: #b91c1c;
  transform: scale(1.1);
}

/* Specific styling for Prompts section to place edit beside delete */
.section-content .prompt-item .edit-button,
.section-content .prompt-item .delete-button {
  display: inline-flex;
}

/* === Footer === */
.sidebar-footer {
  position: sticky;
  bottom: 0;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.avatar {
  background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
  color: white;
  font-weight: 700;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(55, 65, 81, 0.3);
}

.user-details {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.username {
  font-size: 14px;
  font-weight: 600;
  text-transform: capitalize;
  color: #111827;
  margin-bottom: 2px;
}

.status {
  font-size: 12px;
  color: #dc2626;
  font-weight: 500;
}

.logout-btn {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  border: 1px solid #d1d5db;
  color: #374151;
  font-size: 16px;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logout-btn:hover {
  background: linear-gradient(135deg, #d20000 0%, #bc0000 100%);
  color: white;
  transform: scale(1.05);
  /* box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3); */
}

.logout-btn:active {
  transform: scale(0.95);
}

/* === Loading Spinner === */
.loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #b10000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* === Responsive Design === */
@media (max-width: 768px) {
  .sidebar.open {
    width: 280px;
  }
  
  .sidebar-header {
    padding: 16px 20px 12px;
  }
  
  .sidebar-footer {
    padding: 12px 16px;
  }
  
  .files-section-header,
  .prompts-section-header,
  .conversation-header {
    padding: 14px 16px;
  }
}

/* === Enhanced Accessibility === */
.sidebar *:focus {
  /* outline: 2px solid #dc2626; */
  outline-offset: 2px;
}

.sidebar button:focus,
.sidebar input:focus {
  /* outline: 2px solid #dc2626; */
  outline-offset: 2px;
}

/* === Smooth Transitions === */
.sidebar * {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Active States === */
.sidebar button:active {
  transform: scale(0.98);
}

/* === Icon Styling === */
.sidebar-section svg {
  color: #6b7280;
  transition: color 0.3s ease;
}

.sidebar-section:hover svg {
  color: #374151;
  size: 40px;
}

.files-section-header .header-left svg {
  color: #dc2626;
}


.conversation-header .header-left svg {
  color: #374151;
}

.prompts-section-header .header-left svg {
  color: #7c3aed;
}


/* === Preview Sidebar Wrapper === */
.file-preview svg {
  color: #dc2626;
}

.preview-sidebar {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -2px 0 15px rgba(0, 0, 0, 0.08);
  border-left: 1px solid #e5e7eb;
}

.preview-sidebar.open {
  width: 400px;
}

.preview-sidebar.collapsed {
  width: 50px;
  background: #f9fafb;
  border-left: none;
  box-shadow: none;
}

.preview-sidebar.collapsed .toggle-button {
  background-color: #111827;
  color: whitesmoke;
}

/* === Toggle Button === */
.preview-sidebar .toggle-button {
  position: absolute;
  top: 12px;
  right: 3px;
  width: 24px;
  height: 24px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 30%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* .preview-sidebar .toggle-button:hover {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  color: #111827;
} */

/* .preview-sidebar .toggle-button svg {
  transition: all 0.3s ease;
}

.preview-sidebar.collapsed .toggle-button svg {
  transform: rotate(180deg);
} */

/* === File Info Section === */
.preview-sidebar .file-info {
  padding: 20px 18px 16px;
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.file-preview h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.file-info label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
  display: block;
}

.file-info select {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.file-info select:focus {
  border-color: #dc2626;
  outline: none;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
  background: #ffffff;
}

.file-info select:hover {
  background: linear-gradient(135deg, #f8f9fa 0%, #f3f4f6 100%);
  border-color: #9ca3af;
}

.file-info p {
  font-size: 14px;
  color: #6b7280;
  margin: 8px 0;
  padding: 10px 12px;
  background: linear-gradient(135deg, #f8f9fa 0%, #f3f4f6 100%);
  border-radius: 6px;
  border-left: 3px solid #dc2626;
}

.file-info strong {
  color: #374151;
  font-weight: 600;
}

/* === Preview Content Section === */
.preview-sidebar .preview-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 16px 14px 20px;
  background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
  scrollbar-width: thin;
  scrollbar-color: #d1d5db #f9fafb;
}

.preview-sidebar .preview-content::-webkit-scrollbar {
  width: 6px;
}

.preview-sidebar .preview-content::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 3px;
}

.preview-sidebar .preview-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #d1d5db 0%, #9ca3af 100%);
  border-radius: 3px;
}

.preview-sidebar .preview-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #9ca3af 0%, #6b7280 100%);
}

/* === Iframe and DocxViewer Styling === */
.preview-sidebar iframe,
.preview-sidebar .docx-viewer {
  flex: 1;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin-top: 12px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.preview-sidebar iframe:hover,
.preview-sidebar .docx-viewer:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

/* === Preview Page Styling === */
.preview-page {
  padding: 16px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%);
  border-radius: 10px;
  border-left: 4px solid #dc2626;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.preview-page:hover {
  background: linear-gradient(135deg, #f8f9fa 0%, #f3f4f6 100%);
  transform: translateX(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.preview-page strong {
  color: #dc2626;
  font-weight: 700;
  font-size: 14px;
  display: block;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.preview-page p {
  color: #374151;
  line-height: 1.6;
  font-size: 14px;
  margin: 8px 0 12px;
  white-space: pre-wrap;
}

.preview-page small {
  color: #6b7280;
  font-size: 12px;
  font-style: italic;
  display: block;
  margin-top: 8px;
}

.preview-page hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
  margin: 12px 0 0;
}

/* === Preview Placeholder === */
.preview-placeholder {
  padding: 40px 20px;
  color: #6b7280;
  text-align: center;
  font-size: 14px;
  background: linear-gradient(135deg, #f8f9fa 0%, #f3f4f6 100%);
  border-radius: 10px;
  border: 2px dashed #d1d5db;
  margin: 20px 0;
  transition: all 0.3s ease;
}

.preview-placeholder:hover {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  border-color: #9ca3af;
}

/* === DocxViewer Container Styling === */
.preview-sidebar [ref="containerRef"] {
  border: 1px solid #e5e7eb !important;
  padding: 16px !important;
  height: 100% !important;
  overflow-y: auto !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  background: #ffffff !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* === Responsive Design === */
@media (max-width: 768px) {
  .preview-sidebar.open {
    width: 320px;
  }
  
  .preview-sidebar .file-info {
    padding: 16px 14px 12px;
  }
  
  .preview-sidebar .preview-content {
    padding: 12px 10px 16px;
  }
}

/* === Enhanced Accessibility === */
/* .preview-sidebar *:focus {
  outline: 2px solid #dc2626;
  outline-offset: 2px;
}

.preview-sidebar button:focus,
.preview-sidebar select:focus {
  outline: 2px solid #dc2626;
  outline-offset: 2px;
} */

/* === Smooth Transitions === */
.preview-sidebar * {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Active States === */
.preview-sidebar button:active {
  transform: scale(0.98);
}

/* === Loading State Enhancement === */
.preview-sidebar .preview-content p:first-child {
  text-align: center;
  color: #6b7280;
  font-style: italic;
  margin: 40px 0;
}

/* Target the "No prompts available" text */
.no-prompts {
  font-size: 12px;
  color: #6b7280;
  text-align: center;
  padding: 8px;
  background: transparent;
  margin: 0;
}

/* Ensure it fits naturally within the section content */
.section-content .no-prompts {
  display: block;
}
/* Delete Modal Styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease-in;
}
 
.delete-modal {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  width: 500px;
  text-align: center;
  animation: slideDown 0.2s ease-out;
}
 
.delete-modal p {
  font-size: 14px;
  color: #374151;
  margin-bottom: 20px;
}
 
.delete-modal div {
  display: flex;
  justify-content: center;
  gap: 10px;
  width: 470px;
}
 
.confirm-delete,
.cancel-delete {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}
 
.confirm-delete {
  background: #dc2626;
  color: #ffffff;
}
 
.confirm-delete:hover {
  background: #b91c1c;
}
 
.confirm-delete:disabled {
  background: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}
 
.cancel-delete {
  background: #e5e7eb;
  color: #374151;
}
 
.cancel-delete:hover {
  background: #d1d5db;
}
 
/* Animations to smooth the transition */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
 
@keyframes slideDown {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
 
/* Ensure sidebar items don't interfere with modal */
.sidebar-section,
.item {
  position: relative;
  z-index: 1;
}
 