.photo-storage-status {
  position: absolute;
  bottom: 4px;
  left: 4px;
  right: 4px;
  padding: 3px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 11px;
  pointer-events: none;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f9fafb;
  min-height: 100vh;
  color: #111827;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: contain;
}
.logo h1 {
  font-size: 20px;
  font-weight: 600;
  color: #111827;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-primary {
  background: #2563eb;
  color: white;
}
.btn-primary:hover {
  background: #1d4ed8;
}
.btn-secondary {
  background: #f3f4f6;
  color: #111827;
  border: 1px solid #e5e7eb;
}
.btn-secondary:hover {
  background: #e5e7eb;
}
.btn-danger {
  background: #ef4444;
  color: white;
}
.btn-danger:hover {
  background: #dc2626;
}
.btn-success {
  background: #10b981;
  color: white;
}
.btn-success:hover {
  background: #059669;
}
.qty-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #d1d5db;
  background: white;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-btn:hover:not(:disabled) {
  background: #f3f4f6;
  border-color: #9ca3af;
}
.qty-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}
.btn-xs {
  padding: 4px 8px;
  font-size: 11px;
}

.main-content {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
}

.sidebar {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px;
  height: fit-content;
  border: 1px solid #e5e7eb;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
}

.sidebar h2 {
  font-size: 14px;
  margin-bottom: 12px;
  color: #6b7280;
  font-weight: 600;
  text-transform: uppercase;
}

.search-box {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 12px;
}
.search-box:focus {
  outline: none;
  border-color: #2563eb;
}

.visit-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.visit-item {
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}
.visit-item:hover {
  background: #f3f4f6;
}
.visit-item.active {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.05);
}
.visit-item h3 {
  font-size: 14px;
  margin-bottom: 2px;
  color: #111827;
}
.visit-item p {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.visit-item .status {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 6px;
}
.status.draft {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}
.status.in-progress {
  background: rgba(37, 99, 235, 0.15);
  color: #2563eb;
}
.status.completed {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.detail-panel {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.tabs {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  flex-wrap: wrap;
}
.tab {
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.tab:hover {
  color: #111827;
}
.tab.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
  background: #ffffff;
}

.tab-content {
  padding: 24px;
  min-height: 400px;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}
.detail-header h2 {
  font-size: 22px;
  color: #111827;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form-group.full-width {
  grid-column: 1 / -1;
}
.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #ffffff;
  color: #111827;
  font-size: 14px;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.form-group textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  margin: 20px 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}
.section-title:first-of-type {
  margin-top: 0;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
}
.empty-state h3 {
  font-size: 16px;
  margin-bottom: 8px;
  color: #374151;
}

.move-type-toggle {
  display: flex;
  gap: 12px;
}
.move-type-option {
  flex: 1;
  padding: 12px;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
}
.move-type-option:hover {
  background: #f3f4f6;
}
.move-type-option.active {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.05);
}
.move-type-option h4 {
  font-size: 13px;
  margin-bottom: 2px;
  color: #111827;
}
.move-type-option p {
  font-size: 11px;
  color: #6b7280;
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.room-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.room-card:hover {
  border-color: #2563eb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.room-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
  color: #111827;
}
.room-card .stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: #6b7280;
}
.room-card .cube {
  font-size: 14px;
  font-weight: 600;
  color: #2563eb;
  margin-top: 8px;
}
.room-card .room-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.summary-card {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border-radius: 12px;
  padding: 20px;
  color: white;
}
.summary-card.amber {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}
.summary-card.green {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}
.summary-card.purple {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}
.summary-card h4 {
  font-size: 12px;
  opacity: 0.8;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.summary-card .value {
  font-size: 28px;
  font-weight: 700;
}
.summary-card .unit {
  font-size: 14px;
  opacity: 0.8;
}

.room-detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.room-detail-content {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 1000px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
}

.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.photo-item {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #f3f4f6;
  position: relative;
}
.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}
.photo-item img:hover {
  opacity: 0.9;
}
.photo-item .delete-photo {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  z-index: 2;
}

.photo-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 40px;
}
.photo-lightbox.show {
  display: flex;
}
.photo-lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}
.photo-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}
.photo-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}
.photo-lightbox-nav.prev {
  left: 20px;
}
.photo-lightbox-nav.next {
  right: 20px;
}
.photo-lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.5);
  padding: 8px 16px;
  border-radius: 20px;
}
.photo-lightbox-toolbar {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  background: rgba(0, 0, 0, 0.7);
  padding: 8px 16px;
  border-radius: 25px;
}
.photo-lightbox-toolbar button {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.2s;
}
.photo-lightbox-toolbar button:hover {
  background: rgba(255, 255, 255, 0.25);
}
.photo-lightbox-toolbar button.active {
  background: #2563eb;
}
.annotation-canvas-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
}
.annotation-canvas {
  position: absolute;
  top: 0;
  left: 0;
  touch-action: none;
  cursor: crosshair;
}

.audio-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.audio-item {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px;
}
.audio-item .duration {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 6px;
}
.audio-item .transcription {
  font-size: 14px;
  color: #111827;
  line-height: 1.5;
}
.audio-item .audio-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}
.audio-item audio {
  height: 32px;
  flex: 1;
}

.audio-recorder {
  background: #f0fdf4;
  border: 2px dashed #10b981;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  margin-bottom: 16px;
}
.audio-recorder.recording {
  background: #fef2f2;
  border-color: #ef4444;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}
.audio-recorder .record-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: #10b981;
  color: white;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.audio-recorder .record-btn:hover {
  transform: scale(1.05);
}
.audio-recorder.recording .record-btn {
  background: #ef4444;
}
.audio-recorder .record-time {
  margin-top: 12px;
  font-size: 18px;
  font-weight: 600;
  color: #374151;
}
.audio-recorder .record-hint {
  margin-top: 8px;
  font-size: 13px;
  color: #6b7280;
}

.upload-status-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.upload-status-list:empty {
  display: none;
}
.upload-row {
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
}
.upload-row.error {
  border-color: #fecaca;
  background: #fef2f2;
}
.upload-row.done {
  border-color: #a7f3d0;
  background: #ecfdf5;
}
.upload-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.upload-name {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-pct {
  font-size: 12px;
  font-weight: 600;
  color: #2563eb;
  flex-shrink: 0;
}
.upload-done-label {
  font-size: 12px;
  font-weight: 600;
  color: #059669;
  flex-shrink: 0;
}
.upload-dismiss {
  border: none;
  background: none;
  color: #9ca3af;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  padding: 0 4px;
  flex-shrink: 0;
}
.upload-dismiss:hover {
  color: #ef4444;
}
.upload-bar {
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}
.upload-bar-fill {
  height: 100%;
  background: #2563eb;
  border-radius: 3px;
  transition: width 0.15s ease;
}
.upload-row.done .upload-bar-fill {
  background: #10b981;
}
.upload-error-msg {
  font-size: 12px;
  color: #b91c1c;
}

.inventory-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.inventory-table th,
.inventory-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}
.inventory-table th {
  background: #f9fafb;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  font-size: 11px;
}
.inventory-table tr:hover {
  background: #f9fafb;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 20px;
  background: #10b981;
  color: white;
  border-radius: 10px;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s;
  z-index: 2000;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
.toast.error {
  background: #ef4444;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #6b7280;
}

@media (max-width: 900px) {
  .main-content {
    grid-template-columns: 1fr;
  }
  .summary-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  html,
  body {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .container {
    padding: 12px;
    min-width: 320px;
  }
  header {
    flex-wrap: wrap;
    gap: 12px;
  }
  .logo h1 {
    font-size: 16px;
  }
  .summary-cards {
    grid-template-columns: 1fr;
  }
  .sidebar {
    max-height: none;
    margin-bottom: 16px;
  }
  .detail-section {
    padding: 12px;
  }
  .room-grid {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .btn {
    padding: 8px 14px;
    font-size: 13px;
  }
  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px;
  }
  .detail-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .detail-header > div {
    width: 100%;
    justify-content: flex-end;
  }
}

.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e2a4a 0%, #2a3a5a 100%);
}
.auth-card {
  background: white;
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}
.auth-logo img {
  width: auto;
  height: 80px;
  border-radius: 16px;
  margin-bottom: 16px;
  object-fit: contain;
}
.auth-logo h1 {
  font-size: 24px;
  color: #1e2a4a;
  margin-bottom: 4px;
}
.auth-logo p {
  color: #6b7280;
  font-size: 14px;
}
.auth-form .form-group {
  margin-bottom: 16px;
}
.auth-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}
.auth-form input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 15px;
}
.auth-form input:focus {
  outline: none;
  border-color: #1e2a4a;
  box-shadow: 0 0 0 3px rgba(30, 42, 74, 0.1);
}
.auth-form .btn {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  margin-top: 8px;
}
.auth-form .btn-primary {
  background: #1e2a4a;
}
.auth-form .btn-primary:hover {
  background: #2a3a5a;
}
.auth-toggle {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: #6b7280;
}
.auth-toggle a {
  color: #1e2a4a;
  text-decoration: none;
  font-weight: 600;
}
.auth-toggle a:hover {
  text-decoration: underline;
}
.auth-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}
.auth-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #16a34a;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
}
.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-info span {
  font-size: 14px;
  color: #6b7280;
}
.user-info .user-name {
  font-weight: 600;
  color: #111827;
}
.powered-by {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 20px;
  color: #6b7280;
  font-size: 18px;
  width: 100%;
}
.powered-by img {
  height: 70px;
  width: auto;
  border-radius: 8px;
  vertical-align: middle;
  margin-left: -8px;
}
.powered-by span {
  font-weight: 500;
  white-space: nowrap;
}
.app-footer {
  text-align: center;
  padding: 24px;
  border-top: 1px solid #e5e7eb;
  margin-top: 24px;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #f3f4f6;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 8px;
}
.category-header:hover {
  background: #e5e7eb;
}
.category-header h4 {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}
.category-items {
  display: none;
  padding-left: 12px;
  margin-bottom: 16px;
}
.category-items.expanded {
  display: block;
}

.item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f9fafb;
  border-radius: 6px;
  margin-bottom: 6px;
}
.item-row.has-qty {
  background: #eef2ff;
}
.item-info {
  flex: 1;
}
.item-name {
  font-weight: 500;
  font-size: 14px;
}
.item-detail {
  font-size: 12px;
  color: #6b7280;
}
.item-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.item-qty {
  min-width: 32px;
  text-align: center;
  font-weight: 600;
}
.qty-input {
  width: 50px;
  text-align: center;
  font-weight: 600;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 4px 2px;
  font-size: 14px;
}
.qty-input:focus {
  outline: none;
  border-color: #2563eb;
}

.custom-item-form {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}
.custom-item-form h4 {
  font-size: 14px;
  margin-bottom: 12px;
}
.custom-item-form .form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}
.custom-item-form .form-row input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 14px;
}

.template-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
}
.template-card:hover {
  border-color: #2563eb;
}
.template-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
}
.template-card .template-info {
  font-size: 12px;
  color: #6b7280;
}
.template-card .template-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.project-type-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.project-type-tab {
  padding: 8px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}
.project-type-tab:hover {
  background: #f3f4f6;
}
.project-type-tab.active {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

.file-upload-area {
  border: 2px dashed #e5e7eb;
  border-radius: 8px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.file-upload-area:hover {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.02);
}
.file-upload-area input {
  display: none;
}
.file-upload-area p {
  color: #6b7280;
  margin-bottom: 8px;
}

.calculator-panel {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}
.calculator-panel h3 {
  font-size: 16px;
  margin-bottom: 16px;
}
.calculator-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #e5e7eb;
}
.calculator-row:last-child {
  border-bottom: none;
  font-weight: 600;
}

.email-form {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  margin-top: 20px;
}

/* ------------------------------------------------------------------ */
/*  AI Alert Panel (survey_ai.css)                                      */
/* ------------------------------------------------------------------ */
#ai-alerts-panel {
  position: fixed;
  top: 80px;
  right: 16px;
  width: 300px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
#ai-alerts-panel::-webkit-scrollbar {
  width: 4px;
}
#ai-alerts-panel::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 2px;
}
.ai-alert {
  background: #ffffff;
  border-left: 4px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.1),
    0 1px 3px rgba(0, 0, 0, 0.06);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  color: #1f2937;
  pointer-events: all;
  position: relative;
  transition:
    box-shadow 0.15s ease,
    transform 0.15s ease;
  animation: alertSlideIn 0.25s ease forwards;
}
.ai-alert:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
  transform: translateX(-2px);
}
.ai-alert.warning {
  border-left-color: #f59e0b;
}
.ai-alert.suggestion {
  border-left-color: #3b82f6;
}
@keyframes alertSlideIn {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.ai-alert-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 5px;
  padding: 1px 6px;
  border-radius: 4px;
}
.warning-badge {
  background: #fef3c7;
  color: #92400e;
}
.suggestion-badge {
  background: #dbeafe;
  color: #1e40af;
}
.ai-alert-message {
  margin: 0 0 6px;
  font-size: 13px;
  color: #374151;
}
.ai-alert-hint {
  display: inline-block;
  font-size: 10px;
  color: #6b7280;
  background: #f3f4f6;
  border-radius: 4px;
  padding: 1px 6px;
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
}
.ai-alert-dismiss {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  color: #9ca3af;
  padding: 0 2px;
  border-radius: 4px;
  transition:
    color 0.1s,
    background 0.1s;
}
.ai-alert-dismiss:hover {
  color: #374151;
  background: #f3f4f6;
}
#ai-indicator {
  display: inline-block;
  color: #3b82f6;
  font-size: 10px;
  vertical-align: super;
  animation: aiPulse 2s ease-in-out infinite;
  cursor: default;
}
@keyframes aiPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.2;
  }
}
@media (max-width: 768px) {
  #ai-alerts-panel {
    position: fixed;
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-height: 50vh;
    border-top: 1px solid #e5e7eb;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(6px);
    padding: 8px;
    box-sizing: border-box;
    gap: 6px;
    z-index: 1100;
  }
  .ai-alert {
    animation: alertSlideUp 0.2s ease forwards;
  }
  @keyframes alertSlideUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
