/* ViewForm - Premium Read-Only Form Display */

/* Main Container */
.view-form-container {
  padding: 2.5rem 3rem;
  width: 100%;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 1.5rem;
  box-shadow: var(--shadow-xl), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
  animation: fadeInScale 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.view-form-container::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(255, 152, 0, 0.06) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.view-form-container::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(251, 146, 60, 0.05) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.view-form-container > * {
  position: relative;
  z-index: 1;
}

/* Header */
.view-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  position: relative;
}

.view-form-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 152, 0, 0.4) 20%,
    rgba(255, 152, 0, 0.4) 80%,
    transparent 100%
  );
}

.view-form-title {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(
    135deg,
    var(--neutral-800) 0%,
    var(--neutral-600) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  letter-spacing: -0.03em;
  position: relative;
}

.view-form-title::before {
  content: "";
  position: absolute;
  left: -1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 60%;
  background: linear-gradient(180deg, var(--primary-500), var(--primary-600));
  border-radius: 2px;
}

/* Form Selection Section */
.form-selection-section {
  margin-bottom: 2.5rem;
  animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
  animation-delay: 0.1s;
}

.form-select {
  font-size: 1rem;
  font-weight: 500;
}

/* Loading State */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  gap: 1rem;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--neutral-200);
  border-top-color: var(--primary-500);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-state p {
  color: var(--neutral-500);
  font-size: 0.9375rem;
  font-weight: 500;
}

/* Status filter tabs (Opened / Archive) */
.status-filter-tabs {
  display: inline-flex;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--neutral-200);
  background: var(--neutral-50);
  margin-bottom: 1.25rem;
}

.status-filter-tabs .status-tab {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--neutral-600);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.status-filter-tabs .status-tab:hover {
  color: var(--neutral-800);
  background: rgba(255, 255, 255, 0.6);
}

.status-filter-tabs .status-tab.active {
  background: linear-gradient(
    135deg,
    var(--primary-500) 0%,
    var(--primary-600) 100%
  );
  color: white;
}

/* Section Headers */
.section-header-view {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.section-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.view-mode-toggle {
  display: inline-flex;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--neutral-200);
  background: var(--neutral-50);
}

.view-mode-toggle .toggle-btn {
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--neutral-600);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.view-mode-toggle .toggle-btn:hover {
  color: var(--neutral-800);
  background: rgba(255, 255, 255, 0.6);
}

.view-mode-toggle .toggle-btn.active {
  background: linear-gradient(
    135deg,
    var(--primary-500) 0%,
    var(--primary-600) 100%
  );
  color: white;
}

.section-title-view {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--neutral-800);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.count-badge {
  padding: 0.375rem 0.875rem;
  background: linear-gradient(
    135deg,
    var(--primary-100) 0%,
    var(--primary-200) 100%
  );
  border-radius: 2rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary-700);
}

/* Filter Wrapper */
.forms-filter-wrapper {
  margin-bottom: 1.5rem;
}

.forms-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #fafafa 0%, #e5e5e5 100%);
  border-radius: 0.875rem;
  border: 1px solid var(--neutral-200);
}

.filter-bar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-bar-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--neutral-700);
}

.filter-result-summary {
  font-size: 0.8125rem;
  color: var(--neutral-500);
  font-weight: 500;
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 0;
}

.filter-group.filter-search-wrap {
  flex: 1;
  min-width: 200px;
}

.filter-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--neutral-600);
  letter-spacing: 0.02em;
}

.filter-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.filter-input-wrap .filter-input {
  padding-right: 2.25rem;
  width: 100%;
}

.filter-clear-input {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--neutral-500);
  background: var(--neutral-200);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.filter-clear-input:hover {
  color: var(--neutral-800);
  background: var(--neutral-300);
}

.filter-input,
.filter-select {
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  color: var(--neutral-800);
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: 0.5rem;
  min-width: 160px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-input:focus,
.filter-select:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.15);
}

.filter-input::placeholder {
  color: var(--neutral-400);
}

.btn-clear-filters {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary-600);
  background: white;
  border: 1px solid var(--primary-300);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  align-self: flex-end;
}

.btn-clear-filters:hover {
  color: white;
  background: var(--primary-500);
  border-color: var(--primary-500);
}

/* Filter chips – active filters as removable tags */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--neutral-200);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.625rem;
  font-size: 0.8125rem;
  color: var(--neutral-700);
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: 2rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.filter-chip button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
  color: var(--neutral-500);
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.filter-chip button:hover {
  color: var(--primary-600);
  background: var(--primary-100);
}

/* Empty States */
.empty-state-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 2rem;
  text-align: center;
}

.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.6;
}

.empty-state-view p {
  color: var(--neutral-500);
  font-size: 0.9375rem;
  font-weight: 500;
  margin: 0;
}

.empty-selection-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 1rem;
  border: 2px dashed var(--neutral-200);
}

.empty-icon-large {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  opacity: 0.5;
}

.empty-selection-state h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--neutral-700);
  margin: 0 0 0.5rem 0;
}

.empty-selection-state p {
  font-size: 1rem;
  color: var(--neutral-500);
  margin: 0;
  max-width: 300px;
}

/* Responsive Design – Mobile */
@media (max-width: 768px) {
  .view-form-container {
    padding: 1rem 1.25rem;
    border-radius: 1rem;
  }

  .view-form-container::before,
  .view-form-container::after {
    width: 280px;
    height: 280px;
  }

  .view-form-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
  }

  .view-form-header .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  .view-form-title {
    font-size: 1.5rem;
  }

  .view-form-title::before {
    left: -0.5rem;
  }

  .status-filter-tabs {
    width: 100%;
    display: flex;
    margin-bottom: 1rem;
  }

  .status-filter-tabs .status-tab {
    flex: 1;
    min-height: 44px;
    padding: 0.625rem 1rem;
  }

  .section-header-view {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .section-header-actions {
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
  }

  .view-mode-toggle {
    flex: 1;
    min-width: 0;
  }

  .view-mode-toggle .toggle-btn {
    flex: 1;
    min-height: 40px;
    padding: 0.5rem;
    font-size: 0.75rem;
  }

  .forms-filter-bar {
    padding: 1rem;
  }

  .filter-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .filter-group,
  .filter-group.filter-search-wrap {
    min-width: 0;
    width: 100%;
  }

  .filter-input,
  .filter-select {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
  }

  .btn-clear-filters {
    align-self: stretch;
    min-height: 44px;
  }

  .filter-chips {
    gap: 0.375rem;
  }

  .filter-chip {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }

  /* Mobile card layout for table */
  .forms-table-wrapper {
    overflow-x: visible;
    border-radius: 0.75rem;
  }

  .forms-table thead {
    display: none;
  }

  .forms-table tbody tr {
    display: block;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: white;
    border: 1px solid var(--neutral-200);
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }

  .forms-table tbody tr:hover {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }

  .forms-table tbody tr:last-child {
    margin-bottom: 0;
  }

  .forms-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--neutral-100);
    font-size: 0.875rem;
  }

  .forms-table td:last-child {
    border-bottom: none;
    padding-top: 0.75rem;
    padding-bottom: 0;
  }

  .forms-table td::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--neutral-500);
    flex-shrink: 0;
  }

  .forms-table .form-name-cell {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .forms-table .form-name-cell .form-title {
    order: 1;
  }

  .forms-table .form-name-cell .archived-badge,
  .forms-table .form-name-cell .opened-badge,
  .forms-table .form-name-cell .version-badge {
    order: 2;
  }

  .forms-table .actions-cell {
    justify-content: flex-end;
  }

  .forms-table .actions-cell::before {
    content: attr(data-label);
  }

  .btn-action {
    min-height: 44px;
    padding: 0.625rem 1rem;
  }
}

@media (max-width: 480px) {
  .view-form-container {
    padding: 0.75rem 1rem;
  }

  .view-form-title {
    font-size: 1.25rem;
  }

  .section-title-view {
    font-size: 1.125rem;
  }

  .filter-bar-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .count-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
  }

  .forms-table tbody tr {
    padding: 0.875rem;
  }

  .forms-table td {
    font-size: 0.8125rem;
  }

  .empty-state-view {
    padding: 2rem 1rem;
  }
}

/* Animations */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Forms List Section */
.forms-list-section {
  margin-bottom: 2.5rem;
  animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
  animation-delay: 0.1s;
}

/* Forms Table */
.forms-table-wrapper {
  overflow-x: auto;
  border-radius: 0.875rem;
  border: 1px solid var(--neutral-200);
  background: white;
  box-shadow: var(--shadow-sm);
}

.forms-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.forms-table thead {
  background: linear-gradient(135deg, #fafafa 0%, #e5e5e5 100%);
}

.forms-table th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--neutral-600);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 2px solid var(--neutral-200);
}

.forms-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--neutral-100);
  color: var(--neutral-700);
}

.forms-table tbody tr {
  transition: all 0.2s ease;
}

.forms-table tbody tr:hover {
  background: linear-gradient(
    135deg,
    var(--primary-50) 0%,
    rgba(255, 237, 213, 0.3) 100%
  );
}

.forms-table tbody tr:last-child td {
  border-bottom: none;
}

/* Table Cell Styles */
.form-name-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.form-name-and-description {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.form-title {
  font-weight: 600;
  color: var(--neutral-800);
}

.form-description-preview {
  display: block;
  font-size: 0.8125rem;
  color: var(--neutral-500);
  font-weight: 400;
  line-height: 1.4;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.version-badge {
  padding: 0.125rem 0.5rem;
  background: linear-gradient(
    135deg,
    var(--neutral-100) 0%,
    var(--neutral-200) 100%
  );
  color: var(--neutral-600);
  border-radius: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 600;
}

.version-badge.version-col {
  display: inline-block;
}

.archived-badge {
  padding: 0.125rem 0.5rem;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border-radius: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

.opened-badge {
  padding: 0.125rem 0.5rem;
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
  border-radius: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

.type-badge {
  padding: 0.25rem 0.75rem;
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  color: #4338ca;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Action Buttons */
.actions-cell {
  display: flex;
  gap: 0.5rem;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-action svg {
  width: 16px;
  height: 16px;
}

.btn-view {
  background: linear-gradient(
    135deg,
    var(--primary-500) 0%,
    var(--primary-600) 100%
  );
  color: white;
  box-shadow: 0 2px 6px rgba(255, 152, 0, 0.25);
}

.btn-view:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.35);
}

/* Responsive Table */
@media (max-width: 900px) {
  .forms-table th,
  .forms-table td {
    padding: 0.75rem;
  }

  .actions-cell {
    flex-direction: column;
    gap: 0.375rem;
  }

  .btn-action {
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
  }

  .btn-action span {
    display: none;
  }
}

@media (max-width: 640px) {
  .forms-table-wrapper {
    border-radius: 0.5rem;
  }
}

/* ================================
   DARK THEME (night mode) – same as Create Form / Questions
   Background: rgba(58, 56, 56, 0.95), light text
   ================================ */
body.night-mode .view-form-container {
  background: rgba(58, 56, 56, 0.95);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
body.night-mode .view-form-container::before,
body.night-mode .view-form-container::after {
  opacity: 0.25;
}
body.night-mode .view-form-header::after {
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 20%, rgba(255, 255, 255, 0.2) 80%, transparent 100%);
}
body.night-mode .view-form-title {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.85) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
body.night-mode .view-form-title::before {
  background: linear-gradient(180deg, #f87171, #ef4444);
}
body.night-mode .view-form-header .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.25);
}
body.night-mode .view-form-header .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.5);
}
/* Status tabs */
body.night-mode .status-filter-tabs {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}
body.night-mode .status-filter-tabs .status-tab {
  color: rgba(255, 255, 255, 0.85);
}
body.night-mode .status-filter-tabs .status-tab:hover {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.08);
}
body.night-mode .status-filter-tabs .status-tab.active {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
  color: white;
}
/* View mode toggle */
body.night-mode .view-mode-toggle {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}
body.night-mode .view-mode-toggle .toggle-btn {
  color: rgba(255, 255, 255, 0.85);
}
body.night-mode .view-mode-toggle .toggle-btn:hover {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.08);
}
body.night-mode .view-mode-toggle .toggle-btn.active {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
  color: white;
}
/* Section title & count badge */
body.night-mode .section-title-view {
  color: rgba(255, 255, 255, 0.98);
}
body.night-mode .count-badge {
  background: rgba(248, 113, 113, 0.25);
  color: #fca5a5;
}
/* Filter bar */
body.night-mode .forms-filter-bar {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}
body.night-mode .filter-bar-title {
  color: rgba(255, 255, 255, 0.9);
}
body.night-mode .filter-result-summary {
  color: rgba(255, 255, 255, 0.75);
}
body.night-mode .filter-label {
  color: rgba(255, 255, 255, 0.85);
}
body.night-mode .filter-input,
body.night-mode .filter-select {
  background: rgba(58, 56, 56, 1);
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.95);
  color-scheme: dark;
}
body.night-mode .filter-select option {
  background: rgba(58, 56, 56, 1);
  color: rgba(255, 255, 255, 0.95);
}
body.night-mode .filter-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}
body.night-mode .filter-input:focus,
body.night-mode .filter-select:focus {
  border-color: rgba(248, 113, 113, 0.6);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15);
}
body.night-mode .filter-clear-input {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.15);
}
body.night-mode .filter-clear-input:hover {
  color: #f87171;
  background: rgba(255, 255, 255, 0.25);
}
body.night-mode .btn-clear-filters {
  color: #f87171;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(248, 113, 113, 0.5);
}
body.night-mode .btn-clear-filters:hover {
  color: white;
  background: rgba(248, 113, 113, 0.4);
  border-color: #f87171;
}
body.night-mode .filter-chips {
  border-top-color: rgba(255, 255, 255, 0.1);
}
body.night-mode .filter-chip {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}
body.night-mode .filter-chip button {
  color: rgba(255, 255, 255, 0.7);
}
body.night-mode .filter-chip button:hover {
  color: #f87171;
  background: rgba(248, 113, 113, 0.2);
}
/* Empty states */
body.night-mode .empty-state-view p,
body.night-mode .loading-state p {
  color: rgba(255, 255, 255, 0.8);
}
body.night-mode .empty-selection-state {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
}
body.night-mode .empty-selection-state h3 {
  color: rgba(255, 255, 255, 0.95);
}
body.night-mode .empty-selection-state p {
  color: rgba(255, 255, 255, 0.75);
}
body.night-mode .loading-spinner {
  border-color: rgba(255, 255, 255, 0.2);
  border-top-color: #f87171;
}
/* Forms table */
body.night-mode .forms-table-wrapper {
  background: rgba(58, 56, 56, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
}
body.night-mode .forms-table thead {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.06) 100%);
  border-bottom-color: rgba(255, 255, 255, 0.15);
}
body.night-mode .forms-table th {
  color: rgba(255, 255, 255, 0.95);
}
body.night-mode .forms-table td {
  color: rgba(255, 255, 255, 0.9);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
body.night-mode .forms-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.06);
}
body.night-mode .form-title {
  color: rgba(255, 255, 255, 0.98);
}
body.night-mode .form-description-preview {
  color: rgba(255, 255, 255, 0.75);
}
body.night-mode .version-badge {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
}
body.night-mode .archived-badge {
  background: rgba(251, 191, 36, 0.3);
  color: #fcd34d;
}
body.night-mode .opened-badge {
  background: rgba(52, 211, 153, 0.25);
  color: #6ee7b7;
}
body.night-mode .type-badge {
  background: rgba(187, 134, 252, 0.25);
  color: #c4b5fd;
}
/* Mobile card rows */
body.night-mode .forms-table tbody tr {
  background: rgba(58, 56, 56, 0.8);
  border-color: rgba(255, 255, 255, 0.1);
}
body.night-mode .forms-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.08);
}
body.night-mode .forms-table td::before {
  color: rgba(255, 255, 255, 0.75);
}
