/* Base Styles */
:root {
  --primary-color: #0082c9;
  --primary-light: #00a2ff;
  --secondary-color: #ff6600;
  --secondary-light: #ff8533;
  --sidebar-bg: #051440;
  --sidebar-text: #ffffff;
  --header-bg: #ffffff;
  --content-bg: #f5f5f5;
  --border-color: #ddd;
  --hover-bg: #f0f0f0;
  --active-bg: #e6e6e6;
  --text-color: #333;
  --text-secondary: #666;
  --folder-color: #0082c9;
  --image-color: #27ae60;
  --document-color: #e74c3c;
  --spreadsheet-color: #2ecc71;
  --presentation-color: #f39c12;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  --btn-primary-bg: #0082c9;
  --btn-primary-text: #ffffff;
  --btn-secondary-bg: #f0f0f0;
  --btn-secondary-text: #333;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --error-color: #dc3545;
  --info-color: #17a2b8;
}

[data-theme="dark"] {
  --primary-color: #0082c9;
  --primary-light: #00a2ff;
  --secondary-color: #ff6600;
  --secondary-light: #ff8533;
  --sidebar-bg: #1a1a1a;
  --sidebar-text: #ffffff;
  --header-bg: #2d2d2d;
  --content-bg: #1f1f1f;
  --border-color: #444;
  --hover-bg: #3a3a3a;
  --active-bg: #444;
  --text-color: #f0f0f0;
  --text-secondary: #aaa;
  --folder-color: #0082c9;
  --image-color: #2ecc71;
  --document-color: #e74c3c;
  --spreadsheet-color: #27ae60;
  --presentation-color: #f39c12;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.4);
  --btn-primary-bg: #0082c9;
  --btn-primary-text: #ffffff;
  --btn-secondary-bg: #444;
  --btn-secondary-text: #f0f0f0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans",
    "Helvetica Neue", sans-serif;
}

body {
  background-color: var(--content-bg);
  color: var(--text-color);
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
  transition: all 0.3s ease;
}

/* Font size variations */
body.font-small {
  font-size: 12px;
}

body.font-medium {
  font-size: 14px;
}

body.font-large {
  font-size: 16px;
}

/* Compact mode */
body.compact-mode .file-item {
  padding: 6px 10px;
}

body.compact-mode .file-card {
  height: 200px;
}

body.compact-mode .file-thumbnail {
  height: 120px;
}

/* High contrast mode */
body.high-contrast {
  --border-color: #000;
  --text-secondary: #333;
}

[data-theme="dark"] body.high-contrast {
  --border-color: #fff;
  --text-secondary: #ccc;
}

.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* Main Content Styles */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-left: 3rem;
}

/* Header */
.header {
  height: 60px;
  background-color: var(--header-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-left: 1px solid var(--border-color);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  width: 2rem;
  height: 2rem;
  margin-right: 0.5rem;
}

.brand {
  font-family: sans-serif;
  font-size: 20px;
  font-weight: 600;
}

.brand-name {
  color: var(--primary-color);
}

.brand-highlight {
  color: var(--secondary-color);
}

.header-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  margin-right: 2rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-secondary);
  transition: background-color 0.2s, color 0.2s;
  cursor: pointer;
  border: none;
  background: none;
}

.icon-btn:hover {
  background-color: var(--hover-bg);
}

.notification-btn {
  position: relative;
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 16px;
  height: 16px;
  background-color: var(--secondary-color);
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* Search Bar Enhanced */
.search-bar {
  background-color: #f3f4f6;
  border-radius: 7px;
  display: flex;
  align-items: center;
  padding: 0 15px;
  transition: all 0.3s ease;
  margin-left: auto;
  box-sizing: border-box;
  cursor: pointer;
  width: 300px;
  max-width: 100%;
  height: 35px;
  border: 1px solid #b6e3fa;
  margin-right: 1%;
  position: relative;
}

.search-bar:focus-within,
.search-bar.expanded {
  width: 500px;
  box-shadow: 0 2px 8px var(--shadow);
}

.search-bar:active,
.search-bar:focus-within {
  background-color: #f3f4f6;
}

.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  color: var(--text-color);
  font-size: 14px;
}

.search-bar input::placeholder {
  color: var(--text-secondary);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--header-bg);
  border: 1px solid var(--border-color);
  border-radius: 0 0 4px 4px;
  box-shadow: var(--shadow);
  z-index: 100;
  max-height: 300px;
  overflow-y: auto;
  display: none;
}

.search-results.show {
  display: block;
}

.search-result-item {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  cursor: pointer;
  transition: background-color 0.2s;
  border-bottom: 1px solid var(--border-color);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background-color: var(--hover-bg);
}

.search-result-icon {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

.search-result-content {
  flex: 1;
  min-width: 0;
}

.search-result-name {
  font-weight: 500;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-name mark {
  background-color: var(--primary-color);
  color: white;
  padding: 1px 2px;
  border-radius: 2px;
}

.search-result-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

.search-no-results {
  padding: 15px;
  text-align: center;
  color: var(--text-secondary);
}

.search-see-all {
  font-weight: 500;
  color: var(--primary-color);
  justify-content: center;
}

/* Action Toolbar Styles */
.action-toolbar {
  height: 50px;
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 15px;
  gap: 10px;
  z-index: 4;
  transition: background-color 0.3s ease;
}

.action-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 4px;
  white-space: nowrap;
  transition: background-color 0.2s;
  color: var(--text-color);
  font-size: 14px;
}

.action-button:hover {
  background-color: var(--hover-bg);
}

.action-button i {
  font-size: 14px;
}

.dropdown {
  position: relative;
}

.dropdown-toggle {
  padding-right: 25px;
  position: relative;
}

.dropdown-toggle .fa-chevron-down {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--header-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: var(--shadow);
  min-width: 200px;
  z-index: 10;
  display: none;
  max-height: 300px;
  overflow-y: auto;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-section {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

.dropdown-section:last-child {
  border-bottom: none;
}

.dropdown-section-title {
  padding: 5px 15px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 15px;
  text-decoration: none;
  color: var(--text-color);
  transition: background-color 0.2s;
  cursor: pointer;
}

.dropdown-item:hover {
  background-color: var(--hover-bg);
}

.dropdown-item i {
  width: 16px;
  text-align: center;
}

/* Content Container Styles */
.content-container {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* Navigation Sidebar Styles */
.navigation-sidebar {
  width: 235px;
  background-color: var(--header-bg);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.user-profile {
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-color);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-menu {
  list-style: none;
  padding: 10px 0;
}

.nav-item {
  padding: 8px 15px;
  /* display: flex; */
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background-color 0.2s;
  position: relative;
}

.nav-item:hover {
  background-color: var(--hover-bg);
}

.nav-item.active {
  background-color: var(--active-bg);
  border-left: 3px solid var(--primary-color);
  padding-left: 12px;
}

.nav-item i {
  width: 20px;
  text-align: center;
}

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

.dropdown-icon {
  margin-left: auto;
  font-size: 10px;
  transition: transform 0.2s;
}

.nav-item.dropdown.open .dropdown-icon {
  transform: rotate(180deg);
}

.submenu {
  list-style: none;
  margin-top: 5px;
  display: none;
}

.nav-item.dropdown.open .submenu {
  display: block;
}

.submenu .nav-item {
  padding-left: 45px;
}

.submenu .nav-item.active {
  padding-left: 42px;
}

.storage-info {
  margin-top: auto;
  padding: 15px;
  border-top: 1px solid var(--border-color);
}

.storage-text {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.storage-bar {
  height: 4px;
  background-color: var(--border-color);
  border-radius: 2px;
  overflow: hidden;
}

.storage-used {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 2px;
}

/* Files Container Styles */
.files-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 15px;
}

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.view-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.view-title i {
  font-size: 20px;
  color: var(--text-secondary);
}

.view-title h2 {
  font-size: 20px;
  font-weight: 600;
}

.view-actions {
  display: flex;
  gap: 5px;
}

.view-button {
  background: none;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.view-button:hover {
  background-color: var(--hover-bg);
}

.view-button.active {
  background-color: var(--active-bg);
}

.view-button i {
  font-size: 16px;
  color: var(--text-secondary);
}

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

.section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
}

.folders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
  justify-content: center;
}

.folder-item {
  background-color: var(--header-bg);
  border-radius: 8px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow);
}

.folder-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.folder-icon {
  font-size: 30px;
  color: var(--folder-color);
}

.folder-name {
  text-align: center;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.files-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
  margin-bottom: 10px;
}

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

.select-all-checkbox {
  width: 16px;
  height: 16px;
}

.files-header-columns {
  display: flex;
  gap: 20px;
}

.column-size {
  width: 80px;
  text-align: right;
}

.column-modified {
  width: 120px;
  text-align: right;
}

.files-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-secondary);
}

.file-item {
  display: flex;
  align-items: center;
  padding: 10px;
  background-color: var(--header-bg);
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
  width: 100%;
  /* max-width: 1000px; */
}

.file-item:hover {
  background-color: var(--hover-bg);
}

.file-checkbox {
  margin-right: 10px;
}

.file-icon {
  width: 24px;
  text-align: center;
  margin-right: 10px;
}

.file-icon i {
  font-size: 18px;
}

.file-icon.image i {
  color: var(--image-color);
}

.file-icon.document i {
  color: var(--document-color);
}

.file-icon.spreadsheet i {
  color: var(--spreadsheet-color);
}

.file-icon.presentation i {
  color: var(--presentation-color);
}

.file-info {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.file-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-shared {
  margin-left: 10px;
  color: var(--text-secondary);
}

.file-favorite {
  margin-left: 10px;
  color: #f1c40f;
  cursor: pointer;
}

.file-actions {
  margin-left: 10px;
}

.file-actions button {
  background: none;
  border: none;
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.file-actions button:hover {
  background-color: var(--hover-bg);
}

.file-size {
  width: 80px;
  text-align: right;
  color: var(--text-secondary);
}

.file-modified {
  width: 120px;
  text-align: right;
  color: var(--text-secondary);
}

/* Grid View Styles */
.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  justify-content: center;
}

.file-card {
  background-color: var(--header-bg);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow);
  position: relative;
  width: 100%;
  height: 250px; /* Fixed height for all cards */
  max-width: 250px;
  margin: 0 auto;
}

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

.file-thumbnail {
  height: 160px;
  background-color: var(--content-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.file-thumbnail i {
  font-size: 50px;
}

.file-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-card-info {
  padding: 12px;
}

.file-card-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 5px;
  font-size: 15px;
}

.file-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}

.file-card-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 8px;
}

.file-card-actions button {
  background-color: rgba(255, 255, 255, 0.9);
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.file-card-actions button:hover {
  background-color: rgba(255, 255, 255, 1);
}

.file-card-actions .favorite-button i {
  font-size: 18px;
  color: #f1c40f;
}

.file-card-actions .favorite-button.active i {
  color: #f1c40f;
}

.file-card-actions .file-menu-button i {
  font-size: 18px;
  color: #555;
}

.file-menu {
  position: absolute;
  /* top: 40px;
  right: 0; */
  background-color: var(--header-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: var(--shadow);
  min-width: 150px;
  z-index: 10;
}

.file-menu ul {
  list-style: none;
}

.file-menu li {
  padding: 8px 15px;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-color);
}

.file-menu li:hover {
  background-color: var(--hover-bg);
}

.file-menu li i {
  width: 16px;
  text-align: center;
}

.file-shared-users {
  display: flex;
  margin-top: 5px;
}


.shared-user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  margin-right: -8px;
  border: 2px solid var(--header-bg);
}

.see-more-container {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.see-more-button {
  background-color: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s;
}

.see-more-button:hover {
  background-color: var(--border-color);
}

/* Details Sidebar Styles */
.details-sidebar {
  width: 300px;
  background-color: var(--header-bg);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.details-sidebar.show {
  transform: translateX(0);
}

.details-header {
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.details-header h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 5px;
}

.details-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

.close-details {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.close-details:hover {
  background-color: var(--hover-bg);
}

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

.tab-button {
  flex: 1;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transition: background-color 0.2s;
  color: var(--text-color);
}

.tab-button:hover {
  background-color: var(--hover-bg);
}

.tab-button.active {
  border-bottom: 2px solid var(--primary-color);
}

.tab-button i {
  font-size: 16px;
}

.tab-content {
  padding: 15px;
  flex: 1;
  overflow-y: auto;
}

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

.no-comments {
  text-align: center;
  color: var(--text-secondary);
  padding: 20px 0;
}

.sharing-search {
  margin-bottom: 15px;
}

.sharing-search input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  outline: none;
  font-size: 14px;
  background-color: var(--header-bg);
  color: var(--text-color);
}

.sharing-options {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.sharing-option {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sharing-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sharing-icon.admin {
  background-color: #e0f7fa;
  color: #00acc1;
}

.sharing-icon.others {
  background-color: #e8f5e9;
  color: #43a047;
}

.sharing-icon.internal {
  background-color: #f3e5f5;
  color: #8e24aa;
}

.sharing-info {
  flex: 1;
  min-width: 0;
}

.sharing-info h4 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sharing-info p {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sharing-actions {
  display: flex;
  gap: 5px;
}

/* Shared People List */
.shared-people-list {
  margin: 15px 0;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 10px;
}

.shared-people-list h4 {
  font-size: 14px;
  margin-bottom: 10px;
  color: var(--text-secondary);
}

.shared-person {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

.shared-person:last-child {
  border-bottom: none;
}

.shared-person-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.shared-person-info {
  flex: 1;
  min-width: 0;
}

.shared-person-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shared-person-email {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shared-person-role {
  margin-right: 10px;
}

.shared-person-role select {
  padding: 4px 8px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--header-bg);
  color: var(--text-color);
}

.remove-shared-person {
  color: var(--text-secondary);
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  display: none;
}

.modal.show {
  display: flex;
}

.modal-content {
  background-color: var(--header-bg);
  border-radius: 8px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  color: var(--text-color);
  margin-left: 3%;
}

.preview-content {
  max-width: 80vw;
  max-height: 80vh;
  width: auto;
  height: auto;
}

.modal-header {
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.close-modal {
  background: none;
  border: none;
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
  color: var(--text-secondary);
}

.close-modal:hover {
  background-color: var(--hover-bg);
}

.modal-body {
  padding: 15px;
}

.preview-body {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-container {
  max-width: 100%;
  max-height: 70vh;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-container img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.preview-container .document-preview {
  padding: 20px;
  width: 100%;
  height: 100%;
  overflow: auto;
}

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

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  outline: none;
  font-size: 14px;
  background-color: var(--header-bg);
  color: var(--text-color);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s;
}

.btn-primary {
  background-color: var(--btn-primary-bg);
  color: var(--btn-primary-text);
}

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

.btn-secondary {
  background-color: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
}

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

.share-input-container,
.share-link-container {
  display: flex;
  gap: 10px;
}

.share-input-container input,
.share-link-container input {
  flex: 1;
}

.share-settings {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 10px;
}

.setting-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.setting-group label {
  font-weight: normal;
  font-size: 12px;
  color: var(--text-secondary);
}

.password-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.password-toggle input {
  width: auto;
}

/* Notifications Panel */
.notifications-panel {
  position: fixed;
  top: 50px;
  right: 0;
  width: 350px;
  height: calc(100vh - 50px);
  background-color: var(--header-bg);
  border-left: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  z-index: 50;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.notifications-panel.show {
  transform: translateX(0);
}

.notifications-header {
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notifications-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.close-panel {
  background: none;
  border: none;
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
  color: var(--text-secondary);
}

.close-panel:hover {
  background-color: var(--hover-bg);
}

.notifications-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 8px;
  transition: background-color 0.2s;
}

.notification-item:hover {
  background-color: var(--hover-bg);
}

.notification-item.unread {
  background-color: rgba(0, 130, 201, 0.05);
}

.notification-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-weight: 500;
  margin-bottom: 2px;
}

.notification-description {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.notification-time {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Help Panel */
.help-panel {
  position: fixed;
  top: 50px;
  right: 0;
  width: 350px;
  height: calc(100vh - 50px);
  background-color: var(--header-bg);
  border-left: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  z-index: 50;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.help-panel.show {
  transform: translateX(0);
}

.help-header {
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.help-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.help-search {
  padding: 15px;
  display: flex;
  gap: 10px;
}

.help-search input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  outline: none;
  font-size: 14px;
  background-color: var(--header-bg);
  color: var(--text-color);
}

.search-button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.help-categories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0 15px 15px;
}

.help-category {
  background-color: var(--content-bg);
  border-radius: 4px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.help-category:hover {
  background-color: var(--hover-bg);
}

.help-category i {
  font-size: 24px;
  color: var(--primary-color);
}

.help-popular {
  padding: 15px;
  border-top: 1px solid var(--border-color);
}

.help-popular h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
}

.help-articles {
  list-style: none;
}

.help-articles li {
  margin-bottom: 8px;
}

.help-articles a {
  color: var(--primary-color);
  text-decoration: none;
}

.help-articles a:hover {
  text-decoration: underline;
}

.help-contact {
  padding: 15px;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
  text-align: center;
}

.help-contact h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
}

/* User Profile Styles */
.user-profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.user-profile-avatar {
  position: relative;
}

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

.change-avatar-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.user-profile-info {
  flex: 1;
}

.user-profile-info h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 5px;
}

.user-profile-info p {
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.user-role {
  display: inline-block;
  padding: 2px 8px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 12px;
  font-size: 12px;
}

.user-profile-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

/* List View / Grid View Toggle */
.files-section.grid-view .files-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  justify-content: center;
}

.files-section.grid-view .file-item {
  display: none;
}

.files-section.list-view .files-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
}

.files-section.list-view .file-card {
  display: none;
}

.list-view-only {
  display: flex;
}

.files-section.grid-view .list-view-only {
  display: none;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .navigation-sidebar {
    position: fixed;
    left: -235px;
    top: 0;
    height: 100%;
    z-index: 20;
    transition: left 0.3s ease;
  }

  .navigation-sidebar.show {
    left: 0;
  }

  .details-sidebar {
    position: fixed;
    right: 0;
    top: 0;
    height: 100%;
    width: 280px;
    z-index: 20;
  }

  .search-container {
    width: 200px;
  }

  .notifications-panel,
  .help-panel {
    width: 100%;
  }

  .mobile-nav-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-secondary);
  }
}

@media (min-width: 769px) {
  .mobile-nav-toggle {
    display: none;
  }
}

@media (max-width: 576px) {
  .logo-text {
    display: none;
  }

  .action-toolbar {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .action-button span {
    display: none;
  }

  .search-container {
    width: 150px;
  }

  .column-modified {
    display: none;
  }

  .user-profile-details {
    grid-template-columns: 1fr;
  }
}

/* Toggle Switch Styles */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch label {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border-color);
  transition: .4s;
  border-radius: 20px;
}

.toggle-switch label:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

.toggle-switch input:checked + label {
  background-color: var(--primary-color);
}

.toggle-switch input:checked + label:before {
  transform: translateX(20px);
}

/* Theme Preview Styles */
.theme-options {
  display: flex;
  gap: 20px;
}

.theme-option {
  flex: 1;
}

.theme-option input {
  display: none;
}

.theme-preview {
  height: 80px;
  border-radius: 4px;
  margin-bottom: 8px;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}

.theme-option input:checked + label .theme-preview {
  border-color: var(--primary-color);
}

.light-theme {
  background-color: #f5f5f5;
  position: relative;
}

.light-theme:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 30%;
  height: 100%;
  background-color: #051440;
}

.dark-theme {
  background-color: #1f1f1f;
  position: relative;
}

.dark-theme:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 30%;
  height: 100%;
  background-color: #1a1a1a;
}

.theme-option label {
  display: block;
  cursor: pointer;
  text-align: center;
}

/* Settings Tabs Styles */
.settings-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 15px;
}

.settings-tab {
  flex: 1;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  font-weight: 500;
  color: var(--text-color);
  transition: background-color 0.2s;
}

.settings-tab:hover {
  background-color: var(--hover-bg);
}

.settings-tab.active {
  border-bottom: 2px solid var(--primary-color);
}

.settings-content {
  display: block;
}

.settings-content.hidden {
  display: none;
}

/* Text Primary Color */
.text-primary {
  color: var(--primary-color);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--header-bg);
  border: 1px solid var(--border-color);
  border-radius: 0 0 4px 4px;
  box-shadow: var(--shadow);
  z-index: 100;
  max-height: 300px;
  overflow-y: auto;
  display: none;
}

.search-result-item {
  display: flex;
  align-items: center;
  padding: 10px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.search-result-item:hover {
  background-color: var(--hover-bg);
}

.search-result-icon {
  margin-right: 10px;
}

.search-result-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-no-results {
  padding: 10px;
  text-align: center;
  color: var(--text-secondary);
}

.file-card .file-checkbox {
  position: absolute;
  top: 10px;
  left: 10px;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 5;
  width: 18px;
  height: 18px;
}

.file-card:hover .file-checkbox,
.file-card .file-checkbox:checked {
  opacity: 1;
}

.files-section.grid-view .select-all-checkbox {
  margin-right: 10px;
}

/* Responsive Styles */
@media (max-width: 1200px) {
  .files-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

@media (max-width: 992px) {
  .navigation-sidebar {
    width: 200px;
  }

  .files-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

@media (max-width: 768px) {
  .navigation-sidebar {
    position: fixed;
    left: -235px;
    top: 0;
    height: 100%;
    z-index: 20;
    transition: left 0.3s ease;
  }

  .navigation-sidebar.show {
    left: 0;
  }

  .details-sidebar {
    position: fixed;
    right: 0;
    top: 0;
    height: 100%;
    width: 280px;
    z-index: 20;
  }

  .search-container {
    width: 200px;
  }

  .notifications-panel,
  .help-panel {
    width: 100%;
  }

  .mobile-nav-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-secondary);
  }

  .files-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

@media (max-width: 576px) {
  .logo-text {
    display: none;
  }

  .action-toolbar {
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 5px;
  }

  .action-button span {
    display: none;
  }

  .search-container {
    width: 150px;
  }

  .column-modified {
    display: none;
  }

  .user-profile-details {
    grid-template-columns: 1fr;
  }

  .files-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .file-card {
    height: 220px;
  }

  .file-thumbnail {
    height: 130px;
  }
}
