#files-content-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Prevent children from stretching horizontally */
  width: 100%;
  height: auto;
  align-self: start;
  /* Prevent stretching in parent grid */
  padding: 12px;
  padding-top: 15px;
  box-sizing: border-box;
}

.upload_file {
  width: 100%;
  max-width: 500px;
  margin-bottom: 20px;
  position: relative;
  cursor: pointer;
}

.upload_file .upload_file_container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  background: #1b1a2b;
  border: 2px dashed #4275C6;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.upload_file .upload_file_container:hover {
  background: #2b2b2b;
  border-color: #5a8de6;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(66, 117, 198, 0.2);
}

.upload_file .upload_file_container:active {
  transform: translateY(0);
  box-shadow: 0 4px 8px rgba(66, 117, 198, 0.2);
}

.upload_file .upload_file_icon .material-symbols-outlined {
  font-size: 28px;
  color: #4275C6;
}

.upload_file .upload_file_text span {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
}

.upload_file input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}

.upload_folder {
  width: 100%;
  max-width: 500px;
  margin-bottom: 20px;
  position: relative;
  height: 100%;
  cursor: pointer;
}

.upload_folder .upload_folder_container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  background: #1b1a2b;
  border: 2px dashed #e67e22;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.upload_folder .upload_folder_container:hover {
  background: #2b2b2b;
  border-color: #f39c12;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(230, 126, 34, 0.2);
}

.upload_folder .upload_folder_container:active {
  transform: translateY(0);
  box-shadow: 0 4px 8px rgba(230, 126, 34, 0.2);
}

.upload_folder .upload_folder_icon .material-symbols-outlined {
  font-size: 28px;
  color: #e67e22;
}

.upload_folder .upload_folder_text span {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
}

.upload_folder input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}

.create_folder {
  width: 100%;
  max-width: 500px;
  position: relative;
  cursor: pointer;
}

.create_folder .create_folder_container {
  box-sizing: border-box; 
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 15px 20px;
  background: #1b1a2b;
  border: 2px solid #4CAF50;
  border-radius: 8px;
  transition: all 0.3s ease;
  height: 100%;
}

.create_folder .create_folder_container:hover {
  background: #2b2b2b;
  border-color: #66BB6A;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(76, 175, 80, 0.2);
}

.create_folder .create_folder_container:active {
  transform: translateY(0);
  box-shadow: 0 3px 6px rgba(76, 175, 80, 0.2);
}

.create_folder .create_folder_icon .material-symbols-outlined {
  font-size: 24px;
  color: #4CAF50;
}

.create_folder .create_folder_text span {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.folder-name-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease-in;
}

.folder-name-modal .folder-name-modal-content {
  background: #1b1a2b;
  border: 1px solid #2b2b2b;
  border-radius: 12px;
  padding: 30px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.folder-name-modal .folder-name-modal-content h3 {
  color: #ffffff;
  margin: 0 0 20px 0;
  font-size: 18px;
  font-weight: 600;
}

.folder-name-modal .folder-name-modal-content .folder-name-input {
  width: 100%;
  padding: 12px 16px;
  background: #2b2b2b;
  border: 2px solid #444;
  border-radius: 8px;
  color: #ffffff;
  font-size: 16px;
  margin-bottom: 20px;
  box-sizing: border-box;
}

.folder-name-modal .folder-name-modal-content .folder-name-input:focus {
  outline: none;
  border-color: #4CAF50;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.folder-name-modal .folder-name-modal-content .folder-name-input::placeholder {
  color: #888;
}

.folder-name-modal .folder-name-modal-content .folder-name-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.folder-name-modal .folder-name-modal-content .folder-name-actions .btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.folder-name-modal .folder-name-modal-content .folder-name-actions .btn.btn-cancel {
  background: #666;
  color: #ffffff;
}

.folder-name-modal .folder-name-modal-content .folder-name-actions .btn.btn-cancel:hover {
  background: #777;
}

.folder-name-modal .folder-name-modal-content .folder-name-actions .btn.btn-create {
  background: #4CAF50;
  color: #ffffff;
}

.folder-name-modal .folder-name-modal-content .folder-name-actions .btn.btn-create:hover {
  background: #45a049;
}

.folder-name-modal .folder-name-modal-content .folder-name-actions .btn.btn-create:disabled {
  background: #333;
  color: #666;
  cursor: not-allowed;
}

.file-search-container {
  width: 100%;
  box-sizing: border-box;
  max-width: 1000px;
  margin: 20px 0;
  padding: 16px;
  background: #1b1a2b;
  border: 1px solid #2b2b2b;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.file-search-container form {
  width: 100%;
}

.file-search-container .search-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .file-search-container .search-row {
    flex-direction: column;
    gap: 8px;
  }
}

.file-search-container .search-input-container {
  position: relative;
  flex: 2;
  min-width: 200px;
}

.file-search-container .search-input-container .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #888;
  font-size: 20px;
  pointer-events: none;
}

.file-search-container .search-input-container .search-input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  background: #2b2b2b;
  border: 2px solid #444;
  border-radius: 8px;
  color: #ffffff;
  font-size: 14px;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.file-search-container .search-input-container .search-input:focus {
  outline: none;
  border-color: #4275C6;
  box-shadow: 0 0 0 3px rgba(66, 117, 198, 0.1);
}

.file-search-container .search-input-container .search-input::placeholder {
  color: #888;
}

.file-search-container .filter-container,
.file-search-container .sort-container,
.file-search-container .order-container {
  flex: 1;
  min-width: 120px;
}

.file-search-container .filter-container select,
.file-search-container .sort-container select,
.file-search-container .order-container select {
  width: 100%;
  padding: 12px 16px;
  background: #2b2b2b;
  border: 2px solid #444;
  border-radius: 8px;
  color: #ffffff;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.file-search-container .filter-container select:focus,
.file-search-container .sort-container select:focus,
.file-search-container .order-container select:focus {
  outline: none;
  border-color: #4275C6;
  box-shadow: 0 0 0 3px rgba(66, 117, 198, 0.1);
}

.file-search-container .filter-container select option,
.file-search-container .sort-container select option,
.file-search-container .order-container select option {
  background: #2b2b2b;
  color: #ffffff;
  padding: 8px;
}

.file-search-container .search-scope-container {
  display: flex;
  align-items: center;
  min-width: 140px;
}

.file-search-container .search-scope-container .search-scope-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #ffffff;
  user-select: none;
}

.file-search-container .search-scope-container .search-scope-label .search-scope-checkbox {
  width: 16px;
  height: 16px;
  accent-color: #4275C6;
  cursor: pointer;
}

.file-search-container .search-scope-container .search-scope-label .search-scope-text {
  white-space: nowrap;
}

.file-search-container .search-scope-container .search-scope-label:hover {
  color: #4275C6;
}

.no-files {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #888;
  text-align: center;
}

.no-files .material-symbols-outlined {
  font-size: 64px;
  color: #666;
  margin-bottom: 16px;
}

.no-files p {
  margin: 8px 0;
  font-size: 16px;
  color: #aaa;
}

.no-files .filter-note {
  font-size: 14px;
  color: #777;
  font-style: italic;
}

.selection_actions {
    display: grid;
    grid-template-columns: auto auto;
    width: 100%;
    max-width: 1000px;
    gap: 10px;
    justify-content: end;
}

.selection_actions .selection-btn {
  border: 1px solid rgba(97, 123, 176, 0.55);
  background: rgba(25, 36, 58, 0.85);
  color: #dfeaff;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.selection_actions .selection-btn:hover {
  background: rgba(41, 60, 95, 0.95);
}

.selection_actions .selection-btn.active {
  background: rgba(53, 106, 198, 0.35);
  border-color: rgba(93, 144, 234, 0.8);
}

.selection_actions .remove-selected-btn {
  background: rgba(123, 44, 55, 0.9);
  border-color: rgba(173, 77, 95, 0.85);
}

.selection_actions .remove-selected-btn:hover {
  background: rgba(146, 52, 66, 0.96);
}

.selection_actions .selection-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.file-item.selected {
  border-color: rgba(84, 156, 255, 0.9);
  box-shadow: 0 0 0 2px rgba(84, 156, 255, 0.24), 0 12px 24px rgba(9, 16, 33, 0.16);
}

.file-count-container {
  display: grid;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #aaa;
  margin-top: 20px;
  text-align: center;
  width: 100%;
}

.file-count-container .file-count {
  font-weight: 600;
  color: #ffffff;
}

.file-count-container .file-count-icon {
  font-size: 20px;
  color: #4275C6;
}

.breadcrumb-container {
  transition: 0.3s ease;
  flex: none;
  /* override inherited full height */
  width: auto;
  max-width: 1000px;
  flex-shrink: 0;
  flex-grow: 0;
  width: 100%;
  /* improved breadcrumb styling */
  background: #1b1a2b;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.breadcrumb-container .breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  padding: 0;
}

.breadcrumb-container .breadcrumb-nav .breadcrumb-separator {
  color: #a1a1a1;
  font-size: 14px;
  margin: 0 4px;
  display: inline-flex;
  align-items: center;
}

.breadcrumb-container .breadcrumb-nav .breadcrumb-root {
  color: #fff !important;
}

.breadcrumb-container .breadcrumb-nav .breadcrumb-item {
  cursor: pointer;
  transition: 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 8px;
  background: transparent;
  border: none;
  color: #a1a1a1;
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  height: 42px;
  /* Fixed height for all items */
  box-sizing: border-box;
  transition: background 0.2s ease, color 0.2s ease;
  border-radius: 4px;
  margin: 2px;
}

.breadcrumb-container .breadcrumb-nav .breadcrumb-item:hover {
  background: rgba(66, 117, 198, 0.15);
  color: #ffffff;
}

.breadcrumb-container .breadcrumb-nav .breadcrumb-item.breadcrumb-current {
  color: #ffffff;
  font-weight: 600;
  /* Keep same font weight */
  background: #3e6ebb;
}

.breadcrumb-container .breadcrumb-nav .breadcrumb-item .material-symbols-outlined {
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  /* Prevent icon from shrinking */
}

.breadcrumb-container .breadcrumb-nav .breadcrumb-item span:not(.material-symbols-outlined) {
  line-height: 1;
  display: flex;
  align-items: center;
  font-size: 15px;
  /* Explicit size to prevent inheritance issues */
  font-weight: inherit;
  flex-shrink: 0;
  /* Prevent text from affecting height */
}

@media (max-width: 768px) {
  .breadcrumb-container {
    padding: 0 8px;
    margin: 10px 0;
  }
  .breadcrumb-container .breadcrumb-nav {
    gap: 4px;
    padding: 8px 12px;
    border-radius: 8px;
  }
  .breadcrumb-container .breadcrumb-nav .breadcrumb-item {
    padding: 10px 8px;
    /* Match main breadcrumb-item padding */
    font-size: 15px;
    /* Match main breadcrumb-item font-size */
    height: auto;
    /* Remove fixed height */
    min-height: 32px;
    /* Match main breadcrumb-item min-height */
  }
  .breadcrumb-container .breadcrumb-nav .breadcrumb-item.breadcrumb-root .material-symbols-outlined {
    font-size: 14px;
    /* Match main breadcrumb-item icon size */
  }
  .breadcrumb-container .breadcrumb-nav .breadcrumb-item span:not(.material-symbols-outlined) {
    max-width: 120px;
  }
  .breadcrumb-container .breadcrumb-nav .breadcrumb-item .material-symbols-outlined {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .breadcrumb-container .breadcrumb-nav .breadcrumb-item span:not(.material-symbols-outlined) {
    max-width: 80px;
  }
}

.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 1000px;
  box-sizing: border-box;
  justify-items: center;
  align-items: start;
}

.file-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 140px;
  padding: 15px 10px;
  background: #1b1a2b;
  border: 1px solid #2b2b2b;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-align: center;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  animation: fileItemFadeIn 0.4s ease-out forwards;
  height: 100%;
}

.file-item:nth-child(1) {
  animation-delay: 0.05s;
}

.file-item:nth-child(2) {
  animation-delay: 0.1s;
}

.file-item:nth-child(3) {
  animation-delay: 0.15s;
}

.file-item:nth-child(4) {
  animation-delay: 0.2s;
}

.file-item:nth-child(5) {
  animation-delay: 0.25s;
}

.file-item:nth-child(6) {
  animation-delay: 0.3s;
}

.file-item:nth-child(7) {
  animation-delay: 0.35s;
}

.file-item:nth-child(8) {
  animation-delay: 0.4s;
}

.file-item:nth-child(9) {
  animation-delay: 0.45s;
}

.file-item:nth-child(10) {
  animation-delay: 0.5s;
}

.file-item:nth-child(n+11) {
  animation-delay: 0.55s;
}

.file-item:hover {
  background: #252438;
  border-color: #4275C6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(66, 117, 198, 0.2);
  transition: all 0.3s ease, transform 0.2s ease;
}

.file-item.dragging-item {
  opacity: 0.45;
  transform: scale(0.98);
}

.file-item.drop-target {
  border-color: #4CAF50;
  box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.35);
}

.file-item.moving-item {
  pointer-events: none;
  opacity: 0.6;
}

.file-item .file-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-item .file-icon .material-symbols-outlined {
  font-size: 12px;
  color: #4275C6;
}

.file-item .file-icon .material-symbols-outlined.folder-icon {
  background: rgba(255, 177, 77, 0.14);
  color: #ffbf66;
}

/* Top row: icon + badge */
.file-top-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 5px;
}

.file-kind-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(118, 137, 184, 0.14);
  border: 1px solid rgba(118, 137, 184, 0.2);
  color: #a9bad8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.file_info{
  grid-column: span 2;
}

.file-item .file-info .file-name {
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  word-break: break-word;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.file-item .file-info .file-details {
  font-size: 11px;
  color: #888;
  text-align: center;
}

.file-item .file-info .file-details .file-size, .file-item .file-info .file-details .file-date {
  display: block;
  line-height: 1.3;
}

.file-item .folder-actions,
.file-item .file-actions {
  display: none;
  position: absolute;
  top: 8px;
  right: 0px;
  gap: 4px;
}

.file-item:hover .folder-actions,
.file-item:hover .file-actions {
  display: flex;
}

.file-item .action-btn {
  background: rgba(0, 0, 0, 0.7);
  border: none;
  border-radius: 4px;
  padding: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.file-item .action-btn .material-symbols-outlined {
  font-size: 16px;
  color: #ffffff;
}

.file-item .action-btn:hover {
  background: rgba(0, 0, 0, 0.9);
}

.file-item .action-btn.download-btn:hover .material-symbols-outlined {
  color: #4CAF50;
}

.file-item .action-btn.delete-btn:hover .material-symbols-outlined {
  color: #f44336;
}

.file-list-container {
  position: relative;
  width: 100%;
  max-width: 1000px;
  min-height: 400px;
}

.upload_file_dropzone_background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1;
}

.upload_file_dropzone_background .dropzone-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.upload_file_dropzone_background .dropzone-content .material-symbols-outlined {
  font-size: 64px;
  color: #666;
  transition: all 0.3s ease;
}

.upload_file_dropzone_background .dropzone-content span:not(.material-symbols-outlined) {
  font-size: 18px;
  color: #999;
  font-weight: 500;
}

.upload_file_dropzone_background.drag-over {
  opacity: 1;
  pointer-events: auto;
  background: rgba(27, 26, 43, 0.95);
  border: 3px dashed #4275C6;
  border-radius: 12px;
  backdrop-filter: blur(2px);
}

.upload_file_dropzone_background.drag-over .dropzone-content .material-symbols-outlined {
  color: #4275C6;
  animation: bounce 1s infinite;
  font-size: 72px;
}

.upload_file_dropzone_background.drag-over .dropzone-content span:not(.material-symbols-outlined) {
  color: #4275C6;
  font-weight: 600;
  font-size: 20px;
}

.file-item.upload-item {
  background: rgba(27, 26, 43, 0.8);
  border: 2px dashed #4275C6;
  border-radius: 8px;
  opacity: 0.9;
  animation: uploadItemPulse 2s ease-in-out infinite;
  cursor: default;
}

.file-item.upload-item .file-icon .material-symbols-outlined {
  color: #4275C6;
  opacity: 0.7;
  animation: uploadSpin 2s linear infinite;
}

.file-item.upload-item .file-info .file-name {
  color: #4275C6;
  font-weight: 500;
}

.file-item.upload-item .file-info .file-details .upload-status {
  color: #4275C6;
  font-weight: 500;
  font-size: 11px;
}

.file-item.upload-item .file-info .file-details .folder-info {
  color: #FFA726;
  font-weight: 500;
  font-size: 10px;
  font-style: italic;
  display: block;
  line-height: 1.2;
}

.file-item.upload-item .upload-progress-container {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.file-item.upload-item .upload-progress-container .upload-progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(66, 117, 198, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.file-item.upload-item .upload-progress-container .upload-progress-bar .upload-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4275C6, #5185D6);
  border-radius: 2px;
  transition: width 0.3s ease;
  position: relative;
}

.file-item.upload-item .upload-progress-container .upload-progress-bar .upload-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: progressShimmer 1.5s infinite;
}

.file-item.upload-item .upload-progress-container .upload-progress-text {
  font-size: 10px;
  color: #4275C6;
  text-align: center;
  font-weight: 500;
}

.file-info .file-name {
  color: #4275C6;
  /* font-style: italic; */
}

.file-info .upload-status {
  color: #4275C6;
  font-size: 10px;
  font-weight: 600;
}

.upload-progress-container {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.upload-progress-container .upload-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.upload-progress-container .upload-progress-bar .upload-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4275C6, #5a8de6);
  border-radius: 2px;
  transition: width 0.3s ease;
  position: relative;
}

.upload-progress-container .upload-progress-bar .upload-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 1.5s infinite;
}

.upload-progress-container .upload-progress-text {
  font-size: 8px;
  color: #4275C6;
  text-align: center;
  font-weight: 600;
}

.cancel-upload-btn {
  background: rgba(244, 67, 54, 0.8) !important;
}

.cancel-upload-btn:hover {
  background: #f44336 !important;
}

.cancel-upload-btn .material-symbols-outlined {
  color: #ffffff !important;
}

.file-item.summary-upload-item {
  background: rgba(27, 26, 43, 0.9);
  border: 2px dashed #FFA726;
  border-radius: 8px;
  opacity: 0.95;
  animation: uploadItemPulse 2s ease-in-out infinite;
  cursor: default;
}

.file-item.summary-upload-item .file-icon .summary-icon {
  color: #FFA726;
  opacity: 0.8;
  animation: uploadSpin 3s linear infinite;
  font-size: 32px;
}

.file-item.summary-upload-item .file-info .file-name {
  color: #FFA726;
  font-weight: 600;
  /* font-style: italic; */
  font-size: 13px;
}

.file-item.summary-upload-item .file-info .file-details .summary-info {
  color: #FFB74D;
  font-weight: 500;
  font-size: 11px;
  display: block;
  line-height: 1.2;
}

.file-item.summary-upload-item .file-info .file-details .upload-status {
  color: #FFA726;
  font-weight: 500;
  font-size: 11px;
}

.file-item.summary-upload-item .upload-progress-container .upload-progress-bar {
  background: rgba(255, 167, 38, 0.2);
}

.file-item.summary-upload-item .upload-progress-container .upload-progress-bar .upload-progress-fill {
  background: linear-gradient(90deg, #FFA726, #FFB74D);
}

.file-item.summary-upload-item .upload-progress-container .upload-progress-bar .upload-progress-fill::after {
  background: linear-gradient(90deg, transparent, rgba(255, 193, 7, 0.4), transparent);
}

.file-item.summary-upload-item .upload-progress-container .upload-progress-text {
  color: #FFA726;
  font-weight: 600;
}

@keyframes uploadItemPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(66, 117, 198, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(66, 117, 198, 0.1);
  }
}

@keyframes uploadSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes progressShimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

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

@keyframes bounce {
  0%, 20%, 60%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  80% {
    transform: translateY(-5px);
  }
}

.files-grid .file-item {
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  animation: fileItemFadeIn 0.4s ease-out forwards;
}

.files-grid .file-item:nth-child(1) {
  animation-delay: 0.05s;
}

.files-grid .file-item:nth-child(2) {
  animation-delay: 0.1s;
}

.files-grid .file-item:nth-child(3) {
  animation-delay: 0.15s;
}

.files-grid .file-item:nth-child(4) {
  animation-delay: 0.2s;
}

.files-grid .file-item:nth-child(5) {
  animation-delay: 0.25s;
}

.files-grid .file-item:nth-child(6) {
  animation-delay: 0.3s;
}

.files-grid .file-item:nth-child(7) {
  animation-delay: 0.35s;
}

.files-grid .file-item:nth-child(8) {
  animation-delay: 0.4s;
}

.files-grid .file-item:nth-child(9) {
  animation-delay: 0.45s;
}

.files-grid .file-item:nth-child(10) {
  animation-delay: 0.5s;
}

.files-grid .file-item:nth-child(n+11) {
  animation-delay: 0.55s;
}

.files-grid .file-item:hover {
  transition: all 0.3s ease, transform 0.2s ease;
}

@keyframes fileItemFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.files-grid.wave-load .file-item {
  opacity: 0;
  transform: translateY(30px);
  animation: waveLoad 0.6s ease-out forwards;
}

.files-grid.wave-load .file-item:nth-child(4n+1) {
  animation-delay: 0.1s;
}

.files-grid.wave-load .file-item:nth-child(4n+2) {
  animation-delay: 0.2s;
}

.files-grid.wave-load .file-item:nth-child(4n+3) {
  animation-delay: 0.3s;
}

.files-grid.wave-load .file-item:nth-child(4n+4) {
  animation-delay: 0.4s;
}

#files-content-page {
  gap: 15px;
}

.explore-hero {
  width: 100%;
  max-width: 1000px;
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(260px, 0.9fr);
  gap: 18px;
  padding: 18px 20px;
  /* border: 1px solid rgba(83, 104, 144, 0.22); */
  border-radius: 18px;
  /* background: #161b28; */
  /* box-shadow: 0 12px 28px rgba(5, 8, 18, 0.18); */
  box-sizing: border-box;
}

.explore-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}

.explore-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(106, 144, 255, 0.16);
  border: 1px solid rgba(122, 156, 255, 0.24);
  color: #a9c6ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.explore-hero h1 {
  margin: 0;
  color: #f3f6ff;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1;
}

.explore-hero p {
  margin: 0;
  max-width: 58ch;
  color: #9eb0cf;
  font-size: 15px;
  line-height: 1.6;
}

.explore-hero-meta {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
}

.explore-path-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
  grid-template-columns: 80px auto;
  font-size: 1em;
}

.explore-path-card .material-symbols-outlined {
  display: grid;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 184, 87, 0.12);
  color: #ffd58b;
  font-size: 24px;
}

.explore-path-card div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.explore-path-label {
  color: #8ea0c1;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.explore-path-card strong {
  color: #ffffff;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}

.explore-toolbar {
  width: 100%;
  max-width: 1000px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.upload_file,
.upload_folder,
.create_folder {
  max-width: none;
  margin-bottom: 0;
  height: 100%;
}

.explore-tool-card {
  min-height: 78px;
  justify-content: flex-start;
  padding: 14px 16px;
  border-radius: 14px;
}

.explore-tool-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.explore-tool-text strong {
  color: #ffffff;
  font-size: 15px;
  line-height: 1.2;
}

.explore-tool-text span {
  color: #8f9cbc;
  font-size: 13px;
  line-height: 1.4;
}

.explore-search-panel {
  margin: 0;
  border-radius: 16px;
  border: 1px solid rgba(88, 98, 132, 0.32);
  background: #171b28;
  box-shadow: 0 10px 24px rgba(4, 8, 19, 0.16);
}

.file-search-container .search-row {
  gap: 14px;
}

.file-search-container .search-input-container .search-input,
.file-search-container .filter-container select,
.file-search-container .sort-container select,
.file-search-container .order-container select {
  min-height: 48px;
  border-radius: 14px;
  border-color: rgba(91, 102, 137, 0.5);
  background: rgba(9, 12, 21, 0.56);
}

.file-search-container .search-scope-container {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(9, 12, 21, 0.5);
  border: 1px solid rgba(91, 102, 137, 0.36);
}

.breadcrumb-container {
  border: 1px solid rgba(88, 98, 132, 0.32);
  border-radius: 16px;
  background: #161b27;
  box-shadow: 0 10px 22px rgba(4, 8, 19, 0.14);
}

.breadcrumb-container .breadcrumb-nav {
  padding: 10px 10px;
}

.breadcrumb-shell {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.breadcrumb-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb-trail {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}


.breadcrumb-container .breadcrumb-nav .breadcrumb-item.drop-target {
  border-color: #4caf50 !important;
  background: rgba(76, 175, 80, 0.18) !important;
  color: #d5f2dc;
}
.breadcrumb-meta {
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: right;
}

.breadcrumb-meta-label {
  color: #7f90af;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.breadcrumb-meta strong {
  color: #f4f7ff;
  font-size: 14px;
  line-height: 1.3;
  word-break: break-word;
}

.breadcrumb-container .breadcrumb-nav .breadcrumb-item {
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #b3c0da;
}

.breadcrumb-container .breadcrumb-nav .breadcrumb-item:hover {
  background: rgba(109, 145, 230, 0.16);
}

.breadcrumb-icon-btn {
  justify-content: center;
  width: 40px;
  min-width: 40px;
  padding: 0;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.breadcrumb-container .breadcrumb-nav .breadcrumb-item.breadcrumb-current {
  background: rgba(79, 119, 213, 0.22);
  box-shadow: none;
}

.file-count-container {
  max-width: 1000px;
  margin-top: 0;
  padding: 0 4px;
  justify-items: start;
  text-align: left;
}

.file-count-container .file-count-info {
  padding: 0 2px;
}

.file-count-container .file-count-text {
  color: #92a3c0;
  font-size: 13px;
  letter-spacing: 0.01em;
}

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

.file-item {
  min-height: 154px;
  padding: 0;
  border-radius: 14px;
  border: 1px solid rgba(79, 92, 126, 0.32);
  background: #171c29;
  box-shadow: 0 8px 18px rgba(4, 8, 18, 0.12);
}

.file-item:hover {
  border-color: rgba(103, 143, 234, 0.44);
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(9, 16, 33, 0.16);
}

.file-item-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  cursor: pointer;
}
.file-item-header-info{
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.file-item-accent {
  display: none;
}

.file-item .file-icon {
  margin-bottom: 0;
}

.file-item .file-icon .material-symbols-outlined {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: rgba(92, 124, 197, 0.14);
  color: #8eb3ff;
  font-size: 22px;
}

.file-item .file-icon .material-symbols-outlined.folder-icon {
  background: rgba(255, 177, 77, 0.14);
  color: #ffbf66;
}

.file_info{
  grid-column: span 2;
}

/* Middle row: file name */
.file-item .file-name {
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  width: 100%;
  word-break: break-word;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Bottom row: details */
.file-item .file-details {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: #8d9ab3;
  font-size: 11px;
  text-align: center;
}

.file-item .file-info .file-details .file-size,
.file-item .file-info .file-details .file-date {
  display: block;
}

.file-item .file-info .file-details .file-downloads {
  display: block;
  color: #93a8c8;
  font-size: 10px;
  letter-spacing: 0.02em;
}

.file-shared-link {
  width: 100%;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(147, 168, 200, 0.25);
}

.file-shared-link .shared-link-label {
  display: block;
  color: #9eb2d2;
  font-size: 10px;
  margin-bottom: 4px;
}
details .file-size,
.file-item .file-details .file-date {
  display: inline;
}

.file-item .file-details .file-size::after {
  content: " • ";
}

.file-item .file-details .file-date::after {
  content: " • ";
}

.file-item .file-details .file-downloads::before {
  content: "";
}

.file-item .file-details .file-downloads {
  display: inlineowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}

.file-shared-link .shared-link-url:hover {
  color: #a5c1ff;
  text-decoration: underline;
  font-size: 12px;
}

.shared-file-page {
  width: 100%;
  max-width: 860px;
  margin: 26px auto;
  padding: 0 14px;
  box-sizing: border-box;
}

.shared-file-card {
  background: linear-gradient(180deg, #161d2d 0%, #111827 100%);
  border: 1px solid rgba(87, 111, 164, 0.34);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(4, 8, 18, 0.28);
  overflow: hidden;
}

.shared-file-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.shared-file-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(123, 158, 226, 0.38);
  background: rgba(32, 47, 78, 0.58);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.shared-file-header-copy {
  min-width: 0;
}

.shared-file-header-copy h2 {
  margin: 0;
  color: #f1f6ff;
  font-size: 20px;
  letter-spacing: 0.01em;
}

.shared-file-header-copy p {
  margin: 4px 0 0;
  color: #a7badf;
  font-size: 12px;
}

.shared-file-header .material-symbols-outlined {
  color: #9bc0ff;
  font-size: 24px;
}

.shared-file-pill {
  margin-left: auto;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(133, 166, 231, 0.35);
  background: rgba(58, 84, 138, 0.26);
  color: #d8e6ff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.shared-file-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 8px 18px 12px;
}

.shared-file-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  align-items: start;
  padding: 11px 0;
  border-bottom: 1px dashed rgba(131, 153, 197, 0.2);
}

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

.shared-file-row .label {
  color: #94aacf;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.shared-file-row .value {
  color: #ebf1ff;
  font-size: 13px;
  line-height: 1.35;
  word-break: break-word;
}

.shared-file-actions {
  padding: 16px 18px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.shared-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 14px;
  border-radius: 9px;
  background: rgb(6, 11, 22);
  border: 1px solid rgba(129, 169, 255, 0.44);
  box-shadow: 6px 12px 28px rgba(6, 11, 22, 0.48);
  transition: all 0.2s ease;
  color: #e2ecff;
  font-weight: 600;
  text-decoration: none;
}

.shared-download-btn:hover {
  background: rgba(76, 120, 214, 0.34);
}

.shared-download-btn.is-loading {
  pointer-events: none;
  cursor: wait;
  opacity: 0.75;
  background: rgb(19, 19, 19);
  border-color: rgb(75, 75, 75);
}

.shared-file-hint {
  color: #9eb2d8;
  font-size: 12px;
}

@media (max-width: 720px) {
  .shared-file-header {
    flex-wrap: wrap;
  }

  .shared-file-pill {
    margin-left: 0;
  }

  .shared-file-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.file-item .folder-actions,
.file-item .file-actions {
  display: flex;
  opacity: 0;
  pointer-events: none;
  top: 10px;
  width: 100%;
  justify-content: center;

  gap: 6px;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.file-item:hover .folder-actions,
.file-item:hover .file-actions,
.file-item:focus-within .folder-actions,
.file-item:focus-within .file-actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.file-item .action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 10px;
  background: rgba(10, 13, 22, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.file-item .action-btn .material-symbols-outlined {
  font-size: 15px;
}

.file-item .action-btn:hover {
  background: rgba(17, 22, 35, 0.94);
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  .explore-hero {
    grid-template-columns: 1fr;
  }

  .explore-toolbar {
    grid-template-columns: 1fr;
  }

  .breadcrumb-shell {
    grid-template-columns: 1fr;
  }

  .breadcrumb-meta {
    min-width: 0;
    text-align: left;
  }
}

@media (max-width: 768px) {
  #files-content-page {
    padding-top: 26px;
  }

  .explore-hero {
    padding: 16px;
    border-radius: 16px;
  }

  .explore-path-card {
    padding: 12px;
  }

  .file-search-container .search-row {
    gap: 10px;
  }

  .file-search-container .search-scope-container {
    width: 100%;
    justify-content: flex-start;
  }

  .breadcrumb-container {
    padding: 0;
    margin: 0;
  }

  .breadcrumb-container .breadcrumb-nav {
    padding: 12px;
  }

  .breadcrumb-container .breadcrumb-nav .breadcrumb-item {
    min-height: 38px;
    padding: 8px 10px;
  }

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

  .file-item,
  .file-item-content {
    min-height: 144px;
  }
}

@media (max-width: 520px) {
  .files-grid {
    grid-template-columns: 1fr 1fr;
  }

  .file-item .action-btn {
    width: 30px;
    height: 30px;
  }
}

@keyframes waveLoad {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  60% {
    transform: translateY(-5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

#loading-spinner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(27, 26, 43, 0.158);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
  pointer-events: none;
}

#loading-spinner::before {
  content: '';
  width: 40px;
  height: 40px;
  border: 3px solid #333;
  border-top: 3px solid #4275C6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

#loading-spinner.htmx-request {
  display: flex;
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@media (max-width: 600px) {
  .upload-progress,
  .upload-error {
    margin: 10px;
  }
  .upload-progress .upload-progress-header .upload-filename,
  .upload-error .upload-progress-header .upload-filename {
    max-width: 200px;
  }
}

@media (max-width: 768px) {
  .files-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
  }
  .file-item {
    min-height: 130px;
    padding: 12px 8px;
  }
  .file-item .file-icon .material-symbols-outlined {
    font-size: 24px;
  }
  .file-item .file-info .file-name {
    font-size: 12px;
  }
  .file-item .file-info .file-details {
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .files-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
  }
  .file-item {
    min-height: 110px;
    padding: 10px 6px;
  }
  .file-item .file-icon .material-symbols-outlined {
    font-size: 20px;
  }
  .file-item .file-info .file-name {
    font-size: 11px;
  }
}

.overwrite-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(3px);
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.3s ease-out;
}

.overwrite-modal .overwrite-modal-content {
  background: #1b1a2b;
  border: 2px solid #4275C6;
  border-radius: 12px;
  padding: 25px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.overwrite-modal .overwrite-modal-content h3 {
  color: #ffffff;
  margin: 0 0 20px 0;
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  border-bottom: 1px solid #4275C6;
  padding-bottom: 15px;
}

.overwrite-message {
  margin-bottom: 25px;
}

.overwrite-message p {
  color: #ffffff;
  margin-bottom: 15px;
  font-size: 16px;
  line-height: 1.4;
}

.existing-files-list {
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid rgba(244, 67, 54, 0.3);
  border-radius: 8px;
  padding: 15px;
  margin: 15px 0;
  max-height: 200px;
  overflow-y: auto;
  list-style: none;
}

.existing-files-list .existing-file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(244, 67, 54, 0.2);
}

.existing-files-list .existing-file-item:last-child {
  border-bottom: none;
}

.existing-files-list .existing-file-item .material-symbols-outlined {
  color: #f44336;
  font-size: 18px;
}

.existing-files-list .existing-file-item .file-name {
  color: #ffffff;
  font-weight: 500;
  word-break: break-all;
}

.overwrite-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  margin-top: 25px;
}

.overwrite-actions .btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
}

.overwrite-actions .btn.btn-cancel {
  background: #6c757d;
  color: #ffffff;
}

.overwrite-actions .btn.btn-cancel:hover {
  background: #5a6268;
  transform: translateY(-1px);
}

.overwrite-actions .btn.btn-overwrite {
  background: #f44336;
  color: #ffffff;
}

.overwrite-actions .btn.btn-overwrite:hover {
  background: #da190b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 600px) {
  .overwrite-modal-content {
    margin: 20px;
    padding: 20px;
    max-width: none;
    width: calc(100% - 40px);
  }
  .overwrite-modal-content h3 {
    font-size: 18px;
  }
  .overwrite-actions {
    flex-direction: column;
  }
  .overwrite-actions .btn {
    width: 100%;
    min-width: auto;
  }
}

.share-link-modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 24, 0.72);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 16px;
}

.share-link-modal-content {
  width: min(560px, 100%);
  background: linear-gradient(165deg, #151b30, #10172a 55%);
  border: 1px solid rgba(98, 138, 216, 0.45);
  border-radius: 14px;
  box-shadow: 0 28px 52px rgba(4, 12, 31, 0.46);
  padding: 18px;
}

.share-link-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.share-link-modal-header h3 {
  margin: 0;
  color: #e9f0ff;
  font-size: 18px;
  font-weight: 650;
}

.share-link-modal-close {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(148, 171, 216, 0.38);
  background: rgba(31, 44, 71, 0.6);
  color: #d7e4ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.share-link-modal-close:hover {
  background: rgba(52, 72, 113, 0.75);
}

.share-link-modal-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.share-link-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  border-bottom: 1px dashed rgba(141, 168, 219, 0.18);
  padding-bottom: 6px;
}

.share-link-detail-row span {
  color: #98aed7;
}

.share-link-detail-row strong {
  color: #f3f8ff;
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}

.share-link-url-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.share-link-url-group label {
  color: #9fb9ec;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.share-link-url-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.share-link-url-actions input {
  flex: 1;
  min-width: 0;
  border-radius: 9px;
  border: 1px solid rgba(129, 164, 226, 0.35);
  background: rgba(9, 17, 34, 0.64);
  color: #d7e6ff;
  padding: 10px 11px;
  font-size: 12px;
}

.share-link-url-actions button {
  border: none;
  border-radius: 9px;
  background: #3f6fbe;
  color: #f4f8ff;
  font-weight: 600;
  padding: 10px 13px;
  cursor: pointer;
}

.share-link-url-actions button:hover {
  background: #5383d2;
}

.share-link-url-actions #share-link-revoke-btn {
  background: #9f3344;
}

.share-link-url-actions #share-link-revoke-btn:hover {
  background: #bc3d52;
}

.share-link-url-actions button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.share-link-expiry-group {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(120, 150, 210, 0.2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.share-link-expiry-toggle-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #dbe7ff;
  font-size: 13px;
}

.share-link-expiry-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.share-link-expiry-controls input[type="datetime-local"] {
  flex: 1;
  min-width: 0;
  border-radius: 9px;
  border: 1px solid rgba(129, 164, 226, 0.35);
  background: rgba(9, 17, 34, 0.64);
  color: #d7e6ff;
  padding: 10px 11px;
  font-size: 12px;
}

.share-link-expiry-controls button {
  border: none;
  border-radius: 9px;
  background: #35598f;
  color: #f4f8ff;
  font-weight: 600;
  padding: 10px 12px;
  cursor: pointer;
}

.share-link-expiry-controls button:hover {
  background: #426aa8;
}

.share-link-expiry-controls [data-share-expiry-save] {
  background: #2d7f57;
}

.share-link-expiry-controls [data-share-expiry-save]:hover {
  background: #389b6b;
}

.share-link-expiry-status {
  min-height: 1.2em;
  color: #95c8a9;
  font-size: 12px;
}

.share-link-expiry-status.is-error {
  color: #ff9baa;
}

@media (max-width: 600px) {
  .share-link-modal-content {
    padding: 14px;
  }

  .share-link-detail-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .share-link-detail-row strong {
    text-align: left;
  }

  .share-link-url-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .share-link-expiry-controls {
    flex-direction: column;
    align-items: stretch;
  }
}

.upload-progress-modal {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 400px;
  max-height: 500px;
  background: #1b1a2b;
  border: 1px solid #4275C6;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  font-family: inherit;
  display: none;
}

.upload-progress-modal.show {
  display: block;
  transform: translateY(0);
}

.upload-progress-modal.minimized .upload-progress-body {
  display: none;
}

.upload-progress-modal .upload-progress-header {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  border-bottom: 1px solid #2b2b2b;
  background: rgba(66, 117, 198, 0.1);
  border-radius: 12px 12px 0 0;
}

.upload-progress-modal .upload-progress-header .upload-progress-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
}

.upload-progress-modal .upload-progress-header .upload-progress-title .material-symbols-outlined {
  color: #4275C6;
  font-size: 18px;
}

.upload-progress-modal .upload-progress-header .upload-progress-path {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #cccccc;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.upload-progress-modal .upload-progress-header .upload-progress-path .material-symbols-outlined {
  color: #4275C6;
  font-size: 14px;
}

.upload-progress-modal .upload-progress-header .upload-progress-path .upload-path-text {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-progress-modal .upload-progress-header .upload-progress-controls {
  display: flex;
  gap: 5px;
  margin-left: auto;
}

.upload-progress-modal .upload-progress-header .upload-progress-controls button {
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.upload-progress-modal .upload-progress-header .upload-progress-controls button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.upload-progress-modal .upload-progress-header .upload-progress-controls button .material-symbols-outlined {
  font-size: 16px;
}

.upload-progress-modal .upload-progress-body {
  max-height: 400px;
  overflow-y: auto;
  padding: 15px;
}

.upload-progress-modal .upload-progress-body .upload-overall-progress {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #2b2b2b;
}

.upload-progress-modal .upload-progress-body .upload-overall-progress .upload-overall-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
  color: #aaa;
}

.upload-progress-modal .upload-progress-body .upload-overall-progress .upload-overall-text .upload-current {
  color: #4275C6;
  font-weight: 600;
}

.upload-progress-modal .upload-progress-body .upload-overall-progress .upload-overall-text .upload-total {
  color: #ffffff;
  font-weight: 600;
}

.upload-progress-modal .upload-progress-body .upload-overall-progress .upload-overall-bar {
  height: 6px;
  background: rgba(66, 117, 198, 0.2);
  border-radius: 3px;
  overflow: hidden;
}

.upload-progress-modal .upload-progress-body .upload-overall-progress .upload-overall-bar .upload-overall-fill {
  height: 100%;
  background: linear-gradient(90deg, #4275C6, #5a8de6);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.upload-progress-modal .upload-progress-body .upload-files-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.upload-progress-modal .upload-progress-body .upload-files-list .upload-active-files {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.upload-progress-modal .upload-progress-body .upload-files-list .upload-completed-section {
  margin-top: 20px;
  border-top: 1px solid #2b2b2b;
  padding-top: 15px;
}

.upload-progress-modal .upload-progress-body .upload-files-list .upload-completed-section .upload-completed-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(37, 36, 48, 0.6);
  border-radius: 6px;
  margin-bottom: 10px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
}

.upload-progress-modal .upload-progress-body .upload-files-list .upload-completed-section .upload-completed-header:hover {
  background: rgba(47, 46, 58, 0.8);
}

.upload-progress-modal .upload-progress-body .upload-files-list .upload-completed-section .upload-completed-header .material-symbols-outlined {
  font-size: 18px;
  color: #4CAF50;
}

.upload-progress-modal .upload-progress-body .upload-files-list .upload-completed-section .upload-completed-header .material-symbols-outlined:last-child {
  margin-left: auto;
  color: #888;
  font-size: 16px;
}

.upload-progress-modal .upload-progress-body .upload-files-list .upload-completed-section .upload-completed-header span:not(.material-symbols-outlined) {
  font-size: 14px;
  font-weight: 500;
  color: #ccc;
}

.upload-progress-modal .upload-progress-body .upload-files-list .upload-completed-section .upload-completed-header .toggle-completed-btn {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.upload-progress-modal .upload-progress-body .upload-files-list .upload-completed-section .upload-completed-header .toggle-completed-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.upload-progress-modal .upload-progress-body .upload-files-list .upload-completed-section .upload-completed-files {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upload-progress-modal .upload-progress-body .upload-files-list .upload-completed-section .upload-completed-files .upload-file-item {
  opacity: 0.8;
  background: rgba(20, 19, 35, 0.4);
}

.upload-progress-modal .upload-progress-body .upload-files-list .upload-completed-section .upload-completed-files .upload-file-item:hover {
  opacity: 1;
  background: rgba(27, 26, 43, 0.6);
}

.upload-file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(27, 26, 43, 0.5);
  border: 1px solid #2b2b2b;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.upload-file-item:hover {
  background: rgba(37, 36, 48, 0.8);
  border-color: #4275C6;
}

.upload-file-item .upload-file-icon {
  flex-shrink: 0;
}

.upload-file-item .upload-file-icon .material-symbols-outlined {
  font-size: 20px;
  color: #4275C6;
}

.upload-file-item .upload-file-info {
  flex: 1;
  min-width: 0;
}

.upload-file-item .upload-file-info .upload-filename {
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.upload-file-item .upload-file-info .upload-file-details {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: #888;
}

.upload-file-item .upload-file-info .upload-file-details .upload-file-size {
  color: #aaa;
}

.upload-file-item .upload-file-info .upload-file-details .upload-status {
  color: #4275C6;
  font-weight: 500;
}

.upload-file-item .upload-file-info .upload-file-details .upload-status.completed {
  color: #4CAF50;
}

.upload-file-item .upload-file-info .upload-file-details .upload-status.error {
  color: #f44336;
}

.upload-file-item .upload-file-progress {
  flex-shrink: 0;
  width: 80px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.upload-file-item .upload-file-progress .upload-file-progress-bar {
  height: 4px;
  background: rgba(66, 117, 198, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.upload-file-item .upload-file-progress .upload-file-progress-bar .upload-file-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4275C6, #5a8de6);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.upload-file-item .upload-file-progress .upload-file-progress-text {
  font-size: 10px;
  color: #4275C6;
  text-align: center;
  font-weight: 600;
}

.upload-file-item .upload-file-actions {
  flex-shrink: 0;
}

.upload-file-item .upload-file-actions .upload-action-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.upload-file-item .upload-file-actions .upload-action-btn .material-symbols-outlined {
  font-size: 16px;
}

.upload-file-item .upload-file-actions .upload-action-btn.cancel-btn {
  color: #f44336;
}

.upload-file-item .upload-file-actions .upload-action-btn.cancel-btn:hover {
  background: rgba(244, 67, 54, 0.1);
}

.upload-file-item .upload-file-actions .upload-action-btn.success-btn {
  color: #4CAF50;
}

.upload-file-item .upload-file-actions .upload-action-btn.error-btn {
  color: #f44336;
}

.upload-file-item .upload-file-actions .upload-action-btn.error-btn:hover {
  background: rgba(244, 67, 54, 0.1);
}

@media (max-width: 768px) {
  .upload-progress-modal {
    width: calc(100% - 40px);
    max-width: 350px;
    bottom: 10px;
    right: 10px;
  }
}

[data-progress] {
  --progress-width: calc(var(--progress, 0) * 1%);
}

.upload-file-progress-fill[data-progress] {
  width: var(--progress-width);
}

.upload-overall-fill[data-progress] {
  width: var(--progress-width);
}

.hidden {
  display: none !important;
}
