/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #1e293b;
  min-height: 100vh;
}

/* Background */
.background {
  position: fixed;
  inset: 0;
  z-index: 0;
}

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

.background .overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.4);
}

/* Content */
.content {
  position: relative;
  z-index: 10;
}

/* Header */
.header {
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #d1d5db;
}

.header-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0.5rem 1rem;
}

.logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.logo-item {
  width: 2.5rem;
  height: 2.5rem;
  background: white;
  border-radius: 0.5rem;
  padding: 0.25rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

@media (min-width: 640px) {
  .logos { gap: 2rem; }
  .logo-item { width: 3rem; height: 3rem; }
}

@media (min-width: 1024px) {
  .logos { gap: 4rem; }
  .logo-item { width: 3.5rem; height: 3.5rem; }
}

/* Title Section */
.title-section {
  padding: 1.5rem 1rem;
  max-width: 80rem;
  margin: 0 auto;
}

.company-names {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 1rem 0;
}

.company-names h2 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
  text-transform: uppercase;
}

@media (min-width: 640px) {
  .company-names h2 { font-size: 1.25rem; }
}

@media (min-width: 1024px) {
  .company-names h2 { font-size: 1.5rem; }
}

.page-title {
  text-align: center;
  padding: 1rem 0;
}

.page-title h1 {
  font-size: 0.875rem;
  font-weight: 700;
  color: #0f172a;
}

@media (min-width: 640px) {
  .page-title h1 { font-size: 1rem; }
}

@media (min-width: 1024px) {
  .page-title h1 { font-size: 1.125rem; }
}

/* Main Container */
.main-container {
  display: flex;
  justify-content: center;
  padding: 0 1rem 2rem;
}

/* Form Card */
.form-card {
  width: 100%;
  max-width: 64rem;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.form-header {
  padding: 1.5rem 2rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.form-header p {
  text-align: center;
  color: #475569;
  font-size: 1rem;
}

.form-body {
  padding: 2rem;
}

@media (min-width: 640px) {
  .form-body { padding: 2.5rem; }
}

/* Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.form-group.full-width {
  grid-column: 1 / -1;
}

/* Form Group */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
}

/* Input Styles */
input[type="text"],
input[type="number"],
input[type="date"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #1e293b;
  background: white;
  transition: all 0.2s;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

input[type="text"]:hover:not(:focus):not(:disabled),
input[type="number"]:hover:not(:focus):not(:disabled),
input[type="date"]:hover:not(:focus):not(:disabled) {
  border-color: #94a3b8;
}

input:disabled {
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}

/* Combobox */
.combobox {
  position: relative;
}

.combobox input {
  padding-right: 4rem;
}

.combobox .clear-btn {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 1.25rem;
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.2s;
}

.combobox .clear-btn:hover {
  color: #64748b;
}

.combobox .dropdown-arrow {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.75rem;
  pointer-events: none;
  transition: transform 0.2s;
}

.combobox.open .dropdown-arrow {
  transform: translateY(-50%) rotate(180deg);
}

.dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.25rem;
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  max-height: 15rem;
  overflow-y: auto;
  z-index: 50;
  list-style: none;
}

.dropdown-list li {
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background 0.15s;
}

.dropdown-list li:hover,
.dropdown-list li.highlighted {
  background: #dbeafe;
  color: #1e40af;
}

.dropdown-list li.selected {
  background: #eff6ff;
  font-weight: 500;
}

.dropdown-list .no-results {
  padding: 0.5rem 1rem;
  color: #64748b;
  font-size: 0.875rem;
}

/* File Input */
.file-input-wrapper {
  display: flex;
  gap: 0.5rem;
}

input[type="file"] {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  background: white;
}

input[type="file"]::file-selector-button {
  padding: 0.5rem 1rem;
  margin-right: 1rem;
  border: none;
  border-radius: 0.5rem;
  background: #2563eb;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

input[type="file"]::file-selector-button:hover {
  background: #1d4ed8;
}

.clear-all-btn {
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 0.5rem;
  background: #ef4444;
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.clear-all-btn:hover {
  background: #dc2626;
}

.help-text {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.5rem;
}

.file-count {
  margin-left: 0.5rem;
  color: #2563eb;
  font-weight: 600;
}

/* File List */
.file-list {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
}

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

.file-item-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: #dc2626;
  flex-shrink: 0;
}

.file-item-name {
  font-size: 0.875rem;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-item-size {
  font-size: 0.75rem;
  color: #64748b;
  flex-shrink: 0;
}

.file-item-remove {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 0.25rem;
  margin-left: 0.5rem;
  transition: color 0.2s;
}

.file-item-remove:hover {
  color: #dc2626;
}

/* Image Preview Grid */
.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

@media (min-width: 640px) {
  .image-preview-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
  .image-preview-grid { grid-template-columns: repeat(4, 1fr); }
}

.image-preview-item {
  position: relative;
}

.image-preview-item .preview-img {
  aspect-ratio: 1;
  width: 100%;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 2px solid #e2e8f0;
  background: #f1f5f9;
}

.image-preview-item .remove-btn {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 1.5rem;
  height: 1.5rem;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-preview-item:hover .remove-btn {
  opacity: 1;
}

.image-preview-item .file-name {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #475569;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Checkbox */
.checkbox-group {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.75rem;
}

.checkbox-group input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  accent-color: #1e293b;
  cursor: pointer;
}

.checkbox-group label {
  cursor: pointer;
}

/* Submit Button */
.submit-btn {
  width: 100%;
  padding: 1rem 1.5rem;
  background: linear-gradient(to right, #2563eb, #1d4ed8);
  color: white;
  border: none;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
  transition: all 0.2s;
}

.submit-btn:hover:not(:disabled) {
  background: linear-gradient(to right, #1d4ed8, #1e40af);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.spinner {
  width: 1.25rem;
  height: 1.25rem;
  animation: spin 1s linear infinite;
}

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

/* Status Message */
.status-message {
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.status-message.success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.status-message.error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

/* Utility */
.hidden {
  display: none !important;
}

