.files-projects-model-selector-hidden {
  display: none !important;
}

.files-projects-project-button {
  direction: rtl !important;
  min-width: 40px !important;
  max-width: 260px !important;
  height: 36px !important;
  padding: 0.5rem 0.8rem !important;
  border: 1.5px solid var(--brand-medium, #25408f) !important;
  border-radius: 0.5rem !important;
  background: var(--brand-medium, #25408f) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(37, 64, 143, 0.18) !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}

.files-projects-project-button span {
  display: inline-block !important;
  max-width: 190px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.files-projects-project-button svg {
  width: 19px !important;
  height: 19px !important;
  color: currentColor !important;
  stroke: currentColor !important;
}

.files-projects-project-button:hover:not(:disabled) {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 16px rgba(37, 64, 143, 0.24) !important;
}

.files-projects-project-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  direction: rtl !important;
  font-family: inherit !important;
}

.files-projects-project-modal,
.files-projects-project-modal * {
  box-sizing: border-box !important;
}

.files-projects-picker-backdrop {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(15, 23, 42, 0.55) !important;
  backdrop-filter: blur(3px) !important;
}

.files-projects-picker-panel {
  position: absolute !important;
  top: 76px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: min(720px, calc(100vw - 24px)) !important;
  max-height: min(760px, calc(100vh - 108px)) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  border: 1px solid rgba(148, 163, 184, 0.32) !important;
  border-radius: 18px !important;
  background: #fff !important;
  color: #111827 !important;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28) !important;
}

.files-projects-picker-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 1rem !important;
  padding: 1rem 1.25rem !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22) !important;
}

.files-projects-picker-close {
  width: 34px !important;
  height: 34px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: inherit !important;
  font-size: 1.6rem !important;
  line-height: 1 !important;
}

.files-projects-picker-close:hover {
  background: rgba(15, 23, 42, 0.08) !important;
}

.files-projects-picker-actions {
  display: grid !important;
  grid-template-columns: repeat(4, 8.8rem) !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

.files-projects-picker-create-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

.files-projects-picker-actions button,
.files-projects-picker-create-actions button,
.files-projects-picker-sort select {
  border: 1px solid rgba(37, 64, 143, 0.3) !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: var(--brand-medium, #25408f) !important;
  padding: 0.45rem 0.8rem !important;
  font-weight: 600 !important;
}

.files-projects-picker-actions button,
.files-projects-picker-sort,
.files-projects-picker-sort select {
  width: 100% !important;
}

.files-projects-picker-actions button:hover,
.files-projects-picker-create-actions button:hover,
.files-projects-picker-sort select:hover {
  background: rgba(37, 64, 143, 0.08) !important;
}

.files-projects-picker-sort {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  color: #64748b !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
}

.files-projects-picker-sort select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  min-height: 37px !important;
  padding: 0.45rem 0.85rem 0.45rem 2.1rem !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2325408f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-position: left 0.75rem center !important;
  background-size: 1rem 1rem !important;
  background-repeat: no-repeat !important;
}

.files-projects-picker-sort select:focus,
.files-projects-picker-sort select:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.files-projects-picker-create {
  display: none !important;
  margin: 0.9rem 1.25rem 0 !important;
  padding: 0.9rem !important;
  border: 1px solid rgba(148, 163, 184, 0.28) !important;
  border-radius: 14px !important;
  background: rgba(248, 250, 252, 0.8) !important;
}

.files-projects-picker-create.is-visible {
  display: grid !important;
  gap: 0.75rem !important;
}

.files-projects-picker-create label {
  display: grid !important;
  gap: 0.35rem !important;
  color: #334155 !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
}

.files-projects-picker-create input,
.files-projects-picker-create textarea {
  width: 100% !important;
  border: 1px solid rgba(148, 163, 184, 0.55) !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #111827 !important;
  padding: 0.65rem 0.75rem !important;
  outline: none !important;
}

.files-projects-picker-create input:focus,
.files-projects-picker-create textarea:focus {
  border-color: var(--brand-medium, #25408f) !important;
  box-shadow: 0 0 0 3px rgba(37, 64, 143, 0.12) !important;
}

.files-projects-picker-status {
  min-height: 1.35rem !important;
  padding: 0.75rem 1.25rem 0 !important;
  color: #2563eb !important;
  font-size: 0.9rem !important;
}

.files-projects-picker-status.is-error {
  color: #b91c1c !important;
}

.files-projects-picker-list {
  overflow: auto !important;
  padding: 0.75rem 1.25rem 1.25rem !important;
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
  gap: 1.5rem !important;
  align-items: stretch !important;
}

.files-projects-picker-item {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 205px !important;
  text-align: right !important;
  border: 1px solid rgba(226, 232, 240, 1) !important;
  border-radius: 0.5rem !important;
  background: #fff !important;
  color: #111827 !important;
  padding: 1.5rem !important;
  box-shadow: none !important;
  transition: all 0.2s ease !important;
}

.files-projects-picker-item:hover {
  border-color: rgba(226, 232, 240, 1) !important;
  background: #fff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.12), 0 4px 6px -4px rgba(15, 23, 42, 0.12) !important;
}

.files-projects-picker-item.is-selected {
  border-color: rgba(37, 64, 143, 0.7) !important;
  background: #fff !important;
  box-shadow: inset 0 0 0 1px rgba(37, 64, 143, 0.28), 0 10px 15px -3px rgba(15, 23, 42, 0.12) !important;
}

.files-projects-picker-card-header {
  display: flex !important;
  align-items: flex-start !important;
  gap: 1rem !important;
  margin-bottom: 1rem !important;
  min-width: 0 !important;
}

.files-projects-picker-item-info {
  flex: 1 !important;
  min-width: 0 !important;
  display: block !important;
}

.files-projects-picker-item-title {
  display: block !important;
  font-size: 1.125rem !important;
  font-weight: 600 !important;
  margin-bottom: 0.25rem !important;
  color: #111827 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.files-projects-picker-item-desc {
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  color: #64748b !important;
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
  min-height: 2.625rem !important;
}

.files-projects-picker-item-kind {
  display: inline-flex !important;
  width: 48px !important;
  height: 48px !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 0.5rem !important;
  border: 0 !important;
  background: var(--brand-medium, #25408f) !important;
  color: #fff !important;
  box-shadow: none !important;
  flex-shrink: 0 !important;
}

.files-projects-picker-item-kind svg {
  width: 1.5rem !important;
  height: 1.5rem !important;
  fill: currentColor !important;
  stroke: none !important;
}

.files-projects-picker-card-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 1rem !important;
  padding-top: 1rem !important;
  border-top: 1px solid rgba(226, 232, 240, 1) !important;
  color: #111827 !important;
  font-size: 0.875rem !important;
}

.files-projects-picker-card-dates {
  display: grid !important;
  gap: 0.55rem !important;
  min-width: 0 !important;
}

.files-projects-picker-card-status {
  display: inline-flex !important;
  flex: 0 0 auto !important;
}

.files-projects-picker-item-stat {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  min-width: 0 !important;
}

.files-projects-picker-item-stat svg {
  width: 1rem !important;
  height: 1rem !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  flex-shrink: 0 !important;
}

.files-projects-picker-badge {
  display: inline-flex !important;
  align-items: center !important;
  border-radius: 999px !important;
  background: #64748b !important;
  color: #fff !important;
  padding: 0.25rem 0.55rem !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
}

.files-projects-picker-badge.is-active {
  background: var(--brand-medium, #25408f) !important;
}

.files-projects-picker-empty {
  padding: 1.2rem !important;
  text-align: center !important;
  color: #64748b !important;
  border: 1px dashed rgba(148, 163, 184, 0.45) !important;
  border-radius: 14px !important;
}

.files-projects-picker-empty.is-error {
  color: #b91c1c !important;
}

html[data-theme="dark"] .files-projects-project-button {
  background: var(--brand-light, #7dd2ef) !important;
  border-color: var(--brand-light, #7dd2ef) !important;
  color: var(--brand-dark, #16213f) !important;
  box-shadow: 0 4px 12px rgba(125, 210, 239, 0.22) !important;
}

html[data-theme="dark"] .files-projects-picker-panel {
  background: #111827 !important;
  color: #f8fafc !important;
  border-color: rgba(148, 163, 184, 0.25) !important;
}

html[data-theme="dark"] .files-projects-picker-header {
  border-bottom-color: rgba(148, 163, 184, 0.18) !important;
}

html[data-theme="dark"] .files-projects-picker-sort,
html[data-theme="dark"] .files-projects-picker-item-desc,
html[data-theme="dark"] .files-projects-picker-empty {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .files-projects-picker-create,
html[data-theme="dark"] .files-projects-picker-item,
html[data-theme="dark"] .files-projects-picker-sort select {
  background: #0f172a !important;
  color: #f8fafc !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
}

html[data-theme="dark"] .files-projects-picker-sort select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%237dd2ef' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
}

html[data-theme="dark"] .files-projects-picker-item:hover,
html[data-theme="dark"] .files-projects-picker-item.is-selected {
  background: #0f172a !important;
  border-color: rgba(125, 210, 239, 0.55) !important;
}

html[data-theme="dark"] .files-projects-picker-item-title,
html[data-theme="dark"] .files-projects-picker-card-footer {
  color: #f8fafc !important;
}

html[data-theme="dark"] .files-projects-picker-card-footer {
  border-top-color: rgba(148, 163, 184, 0.22) !important;
}

html[data-theme="dark"] .files-projects-picker-item-kind {
  background: var(--brand-light, #7dd2ef) !important;
  color: var(--brand-dark, #16213f) !important;
}

html[data-theme="dark"] .files-projects-picker-create label {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .files-projects-picker-create input,
html[data-theme="dark"] .files-projects-picker-create textarea {
  background: #111827 !important;
  color: #f8fafc !important;
  border-color: rgba(148, 163, 184, 0.35) !important;
}

@media (max-width: 640px) {
  .files-projects-project-button {
    max-width: 150px !important;
    height: 36px !important;
    padding: 0.5rem !important;
  }

  .files-projects-project-button span {
    max-width: 96px !important;
  }

  .files-projects-picker-panel {
    top: 52px !important;
    left: 8px !important;
    right: 8px !important;
    transform: none !important;
    width: auto !important;
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100vh - 104px) !important;
    max-height: calc(100dvh - 104px) !important;
    border-radius: 14px !important;
  }

  .files-projects-picker-header {
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 0.7rem !important;
    padding: 0.85rem !important;
  }

  .files-projects-picker-actions {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.4rem !important;
  }

  .files-projects-picker-close {
    flex: 0 0 auto !important;
  }

  .files-projects-picker-sort {
    max-width: 100% !important;
  }

  .files-projects-picker-actions button,
  .files-projects-picker-create-actions button,
  .files-projects-picker-sort select {
    padding: 0.38rem 0.65rem !important;
    font-size: 0.86rem !important;
    max-width: 100% !important;
  }

  .files-projects-picker-sort select {
    padding: 0.38rem 0.65rem 0.38rem 2.05rem !important;
    background-position: left 0.7rem center !important;
  }

  .files-projects-picker-list {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0.75rem !important;
    padding: 0.65rem 0.85rem 1rem !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .files-projects-picker-item {
    height: auto !important;
    min-height: 190px !important;
    max-height: none !important;
    padding: 1rem !important;
    overflow: visible !important;
  }

  .files-projects-picker-card-header {
    gap: 0.75rem !important;
    margin-bottom: 0.85rem !important;
  }

  .files-projects-picker-item-kind {
    width: 42px !important;
    height: 42px !important;
  }

  .files-projects-picker-item-title {
    font-size: 1rem !important;
  }

  .files-projects-picker-card-footer {
    align-items: flex-end !important;
    gap: 0.6rem !important;
    font-size: 0.82rem !important;
  }

  .files-projects-picker-card-dates {
    gap: 0.45rem !important;
  }

  .files-projects-picker-create {
    margin: 0.75rem 0.85rem 0 !important;
    padding: 0.75rem !important;
  }

  .files-projects-picker-status {
    padding: 0.65rem 0.85rem 0 !important;
  }
}
