/* === FORM STYLES === */

/* Basic Form Controls */
.form-control {
  background-color: #1a1d23;
  color: #e5e7eb;
  border: 1px solid #2c2f36;
}

.form-control:disabled,
.form-control[readonly] {
  background-color: #1a1d23;
  color: #9ca3af;
  opacity: 1;
}

/* === RECIPIENT INPUT WRAPPER STYLING === */
/* Make the recipient input wrapper look like a proper form-control */
.recipient-input-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #e5e7eb;
  background-color: #1a1d23;
  background-clip: padding-box;
  border: 1px solid #2c2f36;
  border-radius: 0.375rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  min-height: calc(1.5em + 0.75rem + 2px);
}

.recipient-input-wrapper:focus-within {
  color: #e5e7eb;
  background-color: #1a1d23;
  border-color: #4b5563;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

/* Style the chips inside the wrapper */
.recipient-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background-color: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  font-size: 0.875rem;
  white-space: nowrap;
}

.recipient-chip .remove-recipient {
  cursor: pointer;
  color: #60a5fa;
  font-weight: bold;
  margin-left: 4px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.recipient-chip .remove-recipient:hover {
  opacity: 1;
  color: #f87171;
}

/* Style the display input inside the wrapper */
.recipient-display-input {
  border: none !important;
  outline: none !important;
  background: transparent !important;
  color: #e5e7eb !important;
  flex: 1;
  min-width: 120px;
  padding: 0 !important;
  font-size: 1rem;
  line-height: 1.5;
}

.recipient-display-input::placeholder {
  color: #6b7280;
  opacity: 1;
}

/* === PERFORMANCE OPTIMIZATIONS === */
/* Lazy load recipient avatars that are hidden */
.recipient-compact-item.recipient-hidden img {
  loading: lazy;
}

/* Optimize animations by using transform instead of changing layout */
.real-time-update {
  animation: slideInFromRight 0.5s ease-out;
}

@keyframes slideInFromRight {
  from {
    transform: translateX(50px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Improve rendering performance for large message threads */
.message-thread .timeline-item {
  contain: layout style;
}

/* Optimize scroll performance */
.message-thread {
  will-change: scroll-position;
}

.form-label {
  color: #e5e7eb;
}

.invalid-feedback {
  color: #f87171;
  font-size: 0.85rem;
}

/* === Chat Form Styles === */
#chat-form .form-control {
  background-color: #1a1d23;
  color: #e5e7eb;
  border: 1px solid #2c2f36;
}

#chat-form .form-control:focus {
  background-color: #1a1d23;
  color: #e5e7eb;
  border-color: #4b5563;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

/* === Custom Form Controls === */
.custom-select-dark {
  background-color: #1a1d23;
  color: #e5e7eb;
  border: 1px solid #2c2f36;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1.5em 1.5em;
}

.custom-select-dark:focus {
  border-color: #4b5563;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.custom-search-dark {
  background-color: #1a1d23;
  color: #e5e7eb;
  border: 1px solid #2c2f36;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: left 0.5rem center;
  background-size: 1em 1em;
  padding-left: 2.5rem;
}

.custom-search-dark {
  background-color: #1a1d23;
  color: #e5e7eb;
  border: 1px solid #2c2f36;
}

.custom-search-dark:focus {
  border-color: #4b5563;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

/* === Vault Search Form === */
.vault-search-form {
  width: 100%;
  margin-bottom: 0;
}

.vault-search-container {
  width: 100%;
  position: relative;
}

.vault-search-inner {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  background: rgba(30, 40, 50, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15),
              0 1px 3px rgba(0, 0, 0, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.vault-search-inner:hover {
  background: rgba(30, 40, 50, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25),
              0 2px 6px rgba(0, 0, 0, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.vault-search-inner:focus-within {
  background: rgba(30, 40, 50, 0.7);
  border: 1px solid rgba(59, 130, 246, 0.4);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3),
              0 3px 8px rgba(0, 0, 0, 0.4),
              inset 0 1px 0 rgba(255, 255, 255, 0.2),
              0 0 0 3px rgba(59, 130, 246, 0.15);
  transform: translateY(-2px);
}

.vault-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  z-index: 2;
  transition: all 0.3s ease;
  pointer-events: none;
}

.vault-search-inner:hover .vault-search-icon {
  color: rgba(255, 255, 255, 0.8);
  transform: translateY(-50%) scale(1.05);
}

.vault-search-inner:focus-within .vault-search-icon {
  color: rgba(59, 130, 246, 0.9);
  transform: translateY(-50%) scale(1.1);
}

.vault-search-input {
  width: 100%;
  padding: 14px 20px 14px 50px;
  background: transparent;
  border: none;
  outline: none;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  box-shadow: none;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.vault-search-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  transition: all 0.3s ease;
}

.vault-search-input:hover::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.vault-search-input:focus::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.vault-search-input:focus {
  color: rgba(255, 255, 255, 1);
  font-weight: 450;
}

/* Webkit search input styling for Vault */
.vault-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  height: 16px;
  width: 16px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.vault-search-input::-webkit-search-cancel-button:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.vault-search-input::-webkit-search-cancel-button::before {
  content: '×';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

/* Firefox search input styling for Vault */
.vault-search-input[type="search"] {
  -moz-appearance: textfield;
}

/* === Messages Search Form === */
.messages-search-form {
  width: 280px;
  margin-bottom: 0;
}

.messages-search-container {
  width: 100%;
  position: relative;
}

.messages-search-inner {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  background: rgba(30, 40, 50, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 10px !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15),
              0 1px 3px rgba(0, 0, 0, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  overflow: hidden;
}

.messages-search-inner:hover {
  background: rgba(30, 40, 50, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.25),
              0 2px 6px rgba(0, 0, 0, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  transform: translateY(-1px) !important;
}

.messages-search-inner:focus-within {
  background: rgba(30, 40, 50, 0.7) !important;
  border: 1px solid rgba(59, 130, 246, 0.4) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3),
              0 3px 8px rgba(0, 0, 0, 0.4),
              inset 0 1px 0 rgba(255, 255, 255, 0.2),
              0 0 0 3px rgba(59, 130, 246, 0.15) !important;
  transform: translateY(-1px) !important;
}

.messages-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.6) !important;
  font-size: 0.85rem !important;
  z-index: 2;
  transition: all 0.3s ease !important;
  pointer-events: none;
}

.messages-search-inner:hover .messages-search-icon {
  color: rgba(255, 255, 255, 0.8) !important;
  transform: translateY(-50%) scale(1.05) !important;
}

.messages-search-inner:focus-within .messages-search-icon {
  color: rgba(59, 130, 246, 0.9) !important;
  transform: translateY(-50%) scale(1.1) !important;
}

.messages-search-input {
  width: 100% !important;
  padding: 10px 16px 10px 40px !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: rgba(255, 255, 255, 0.95) !important;
  font-size: 0.8rem !important;
  line-height: 1.2rem !important;
  font-weight: 400 !important;
  letter-spacing: 0.01em !important;
  box-shadow: none !important;
  border-radius: 10px !important;
  transition: all 0.3s ease !important;
}

.messages-search-input::placeholder {
  color: rgba(255, 255, 255, 0.5) !important;
  font-size: 0.8rem !important;
  font-weight: 400 !important;
  letter-spacing: 0.01em !important;
  transition: all 0.3s ease !important;
}

.messages-search-input:hover::placeholder {
  color: rgba(255, 255, 255, 0.6) !important;
}

.messages-search-input:focus::placeholder {
  color: rgba(255, 255, 255, 0.4) !important;
}

.messages-search-input:focus {
  color: rgba(255, 255, 255, 1) !important;
  font-weight: 450 !important;
}

/* Webkit search input styling for Messages */
.messages-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  height: 14px;
  width: 14px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.messages-search-input::-webkit-search-cancel-button:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.messages-search-input::-webkit-search-cancel-button::before {
  content: '×';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

/* Firefox search input styling for Messages */
.messages-search-input[type="search"] {
  -moz-appearance: textfield;
}

/* === Input Overlay & Overlays === */
.input-overlay {
  min-width: 140px;
  background-color: #1e1e1e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  transition: opacity 0.2s ease;
  padding: 0.25rem 0;
}

.overlay-option {
  cursor: pointer;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  transition: background-color 0.2s ease;
}

.overlay-option i {
  font-size: 1rem;
  color: #cbd5e1;
}

.overlay-option:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.conditional-fields {
  background-color: #2b2f36;
  border-radius: 6px;
}

.conditional-fields select,
.conditional-fields input {
  font-size: 0.85rem;
  background-color: #1a1d23;
  color: #e5e7eb;
  border: 1px solid #3a3f4b;
}

.conditional-fields select:focus,
.conditional-fields input:focus {
  border-color: #4b5563;
  box-shadow: none;
}

.context-overlay {
  width: 260px;
  background-color: #1e1e1e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

.context-overlay .form-control {
  background-color: #2a2a2f !important;
  color: #e5e7eb;
  border-color: #3a3f4b;
}

.context-overlay .form-control::placeholder {
  color: #6b7280;
  font-size: 0.775rem;
}

.database-overlay {
  width: 360px;
  background-color: #1e1e1e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 1rem;
}

/* === Editable Form Controls === */
.editable input.form-control,
.editable textarea.form-control {
  background: transparent;
  border: none;
  outline: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
  display: block;
  resize: none;

  font-family: 'Inter', sans-serif;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

.editable input.form-control {
  all: unset;
  display: block;

  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.375rem;

  height: 1.375rem;
  padding: 0;
  margin: 0;

  transform: translateY(-1px);
}

.editable textarea.form-control {
  all: unset;
  display: block;

  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  color: #9ca3af;
  line-height: 1.6;

  height: 1.4rem;
  padding: 0;
  margin: 0 0 1rem 0;

  width: 100%;
}

/* === Wide Search === */
.wide-search {
  width: 100%;
}

input[type="search"]::placeholder {
  color: #6b7280;
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  transition: all 0.3s ease;
}

/* === Recipient Input Styles === */
.recipient-input-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: rgba(45, 55, 72, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  min-height: 48px;
  position: relative;
  z-index: 1;
  pointer-events: auto;
  box-shadow: none;
  cursor: text;
}

.recipient-input-wrapper:focus-within {
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
  background: rgba(45, 55, 72, 0.9);
}

.recipient-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.recipient-display-input {
  font-size: 14px !important;
  line-height: 1.5 !important;
  margin: 0 !important;
  padding: 4px 0 !important;
  font-family: inherit !important;
}

.recipient-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: default;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  max-width: 200px;
}

.recipient-chip:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-1px);
}

.recipient-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(156, 163, 175, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  flex-shrink: 0;
}

.recipient-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recipient-remove {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.recipient-remove:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.6);
  transform: scale(1.1);
}

.recipient-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(30, 40, 50, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
  margin-top: 4px;
}

/* Higher z-index for dropdowns inside modals */
#composeModal .recipient-dropdown,
.custom-modal .recipient-dropdown {
  z-index: 10100 !important;
}

/* Even higher z-index with more specific targeting */
#composeModal .position-relative .recipient-dropdown,
#composeModal .mb-3 .recipient-dropdown,
.modal-dialog .recipient-dropdown,
.modal-content .recipient-dropdown {
  z-index: 15000 !important;
  position: absolute !important;
}

/* Target the correct autocomplete dropdown class */
#composeModal .autocomplete-dropdown,
.custom-modal .autocomplete-dropdown,
.modal-dialog .autocomplete-dropdown,
.modal-content .autocomplete-dropdown {
  z-index: 20000 !important;
  position: absolute !important;
}

/* More specific targeting for the dropdown-menu class used by autocomplete */
#composeModal .dropdown-menu.autocomplete-dropdown,
.custom-modal .dropdown-menu.autocomplete-dropdown,
.modal-dialog .dropdown-menu.autocomplete-dropdown,
.modal-content .dropdown-menu.autocomplete-dropdown {
  z-index: 25000 !important;
  position: absolute !important;
}

/* Even more specific targeting for compose modal */
#composeModal .recipient-input-wrapper .dropdown-menu,
#composeModal .mb-3 .dropdown-menu,
#composeModal .position-relative .dropdown-menu {
  z-index: 30000 !important;
  position: absolute !important;
}

/* Ultra-specific targeting to override any Bootstrap z-index */
.custom-modal#composeModal .dropdown-menu,
.custom-modal#composeModal .autocomplete-dropdown,
div.custom-modal#composeModal .dropdown-menu,
div.custom-modal#composeModal .autocomplete-dropdown {
  z-index: 35000 !important;
  position: absolute !important;
}

.recipient-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.recipient-dropdown-item:hover {
  background: rgba(59, 130, 246, 0.1);
  color: rgba(255, 255, 255, 1);
}

.recipient-dropdown-item.selected {
  background: rgba(59, 130, 246, 0.2);
  color: rgba(255, 255, 255, 1);
}

.recipient-dropdown-item .recipient-avatar {
  width: 32px;
  height: 32px;
  font-size: 0.875rem;
}

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

.recipient-info-name {
  font-weight: 500;
  margin-bottom: 2px;
}

.recipient-info-email {
  font-size: 0.8125rem;
  color: rgba(156, 163, 175, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  .recipient-input-wrapper {
    padding: 6px 8px;
    gap: 4px;
    min-height: 44px;
  }
  
  .recipient-chip {
    padding: 4px 8px;
    font-size: 0.8125rem;
    gap: 5px;
    max-width: 140px;
  }
  
  .recipient-avatar {
    width: 18px;
    height: 18px;
  }
  
  .recipient-remove {
    width: 16px;
    height: 16px;
    font-size: 0.65rem;
  }
}

/* === Compose Modal Form Labels === */
#composeModal .form-label i:hover {
  color: #60a5fa;
  transform: scale(1.1);
}

#composeModal .form-label {
  color: #e5e7eb;
  font-weight: 500;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#composeModal .form-label i {
  color: #9ca3af;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

/* === Authentication Forms === */
body.auth-layout .auth-form {
  background: transparent;
  padding: 0;
}

body.auth-layout .auth-form .form-group {
  margin-bottom: 1.5rem;
}

body.auth-layout .auth-form .form-label {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  display: block;
}

body.auth-layout .input-wrapper {
  position: relative;
}

body.auth-layout .input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.4);
  font-size: 1rem;
  transition: all 0.3s ease;
  pointer-events: none;
}

body.auth-layout .modern-input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  background: rgba(30, 40, 50, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  transition: all 0.3s ease;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.auth-layout .modern-input:focus {
  background: rgba(30, 40, 50, 0.6);
  border: 1px solid rgba(59, 130, 246, 0.4);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15),
              0 0 0 3px rgba(59, 130, 246, 0.1);
  outline: none;
  transform: translateY(-1px);
}

body.auth-layout .modern-input:focus + .input-icon {
  color: rgba(59, 130, 246, 0.8);
}

body.auth-layout .modern-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

body.auth-layout .auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

body.auth-layout .remember-me {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

body.auth-layout .modern-checkbox {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  background: transparent;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

body.auth-layout .modern-checkbox:checked {
  background: linear-gradient(135deg, #3b82f6, #1e40af);
  border-color: #3b82f6;
}

body.auth-layout .modern-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: 600;
}

body.auth-layout .auth-form .form-check-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  cursor: pointer;
}

/* === Responsive Form Adjustments === */
@media (max-width: 768px) {
  .vault-search-inner {
    border-radius: 10px;
  }

  .vault-search-input {
    font-size: 0.8125rem;
    padding: 12px 16px 12px 44px;
  }

  .vault-search-icon {
    left: 15px;
    font-size: 0.85rem;
  }

  .vault-search-input::placeholder {
    font-size: 0.8125rem;
  }

  .recipient-input-wrapper {
    min-height: 40px;
    padding: 4px 6px;
  }

  .dropdown-menu .dropdown-item {
    font-size: 0.8rem;
  }
}

@media (max-width: 576px) {
  .vault-search-inner {
    border-radius: 8px;
  }

  .vault-search-input {
    font-size: 0.8rem;
    padding: 10px 14px 10px 40px;
  }

  .vault-search-icon {
    left: 14px;
    font-size: 0.8rem;
  }

  .vault-search-input::placeholder {
    font-size: 0.8rem;
  }

  .auth-options {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .modern-input {
    font-size: 0.85rem !important;
    padding: 12px 14px 12px 44px !important;
  }
}

/* === Auth Page Specific Form Styles === */
.auth-register .modern-input {
  border-color: rgba(34, 197, 94, 0.2);
}

.auth-register .modern-input:focus {
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15),
              0 0 0 3px rgba(34, 197, 94, 0.1);
}

.auth-register .modern-input:focus + .input-icon {
  color: rgba(34, 197, 94, 0.8);
}

.auth-reset .modern-input:focus {
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15),
              0 0 0 3px rgba(168, 85, 247, 0.1);
}

.auth-reset .modern-input:focus + .input-icon {
  color: rgba(168, 85, 247, 0.8);
}

.modern-input:focus,
.modern-checkbox:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

@media (prefers-color-scheme: dark) {
  .modern-input {
    background: rgba(30, 40, 50, 0.6);
    border-color: rgba(255, 255, 255, 0.15);
  }
} 