/* Collectible Insurance Photo Logger - Styles */
:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-light: #dbeafe;
  --color-secondary: #64748b;
  --color-success: #16a34a;
  --color-danger: #dc2626;
  --color-warning: #d97706;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-border: #e2e8f0;
  --color-text: #1e293b;
  --color-text-light: #64748b;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition: 0.2s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-primary);
}

.logo-icon {
  width: 28px;
  height: 28px;
}

.main-nav {
  display: flex;
  gap: 8px;
}

.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  color: var(--color-text-light);
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition);
}

.nav-link:hover,
.nav-link.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
  padding: 60px 0;
}

.hero-content {
  text-align: center;
}

.hero-content h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 1.125rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 32px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
}

.stat-label {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* Section Styles */
.section-header {
  text-align: center;
  margin-bottom: 32px;
}

.section-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.section-header p {
  color: var(--color-text-light);
}

/* Logger Section */
.logger-section {
  padding: 48px 0;
}

.logger-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
}

.logger-form-container {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.logger-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-text);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.input-prefix .prefix {
  position: absolute;
  left: 16px;
  color: var(--color-text-light);
  font-weight: 500;
}

.input-prefix input {
  padding-left: 32px;
  width: 100%;
}

/* Photo Upload */
.upload-zone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}

.upload-zone:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.upload-icon {
  width: 48px;
  height: 48px;
  color: var(--color-text-light);
  margin-bottom: 12px;
}

.upload-zone span {
  display: block;
  color: var(--color-text);
}

.upload-hint {
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-top: 4px;
}

.photo-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.preview-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

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

.preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
}

.btn-secondary {
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-border);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary-light);
}

.btn-danger {
  background: transparent;
  color: var(--color-danger);
  border: 1px solid var(--color-danger);
}

.btn-danger:hover {
  background: #fef2f2;
}

.btn-icon {
  width: 18px;
  height: 18px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

/* Sidebar */
.logger-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.sidebar-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--color-text);
}

.tips-list,
.mistakes-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tips-list li,
.mistakes-list li {
  font-size: 0.875rem;
  color: var(--color-text-light);
  padding-left: 24px;
  position: relative;
}

.tips-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-success);
  font-weight: 700;
}

.mistakes-list li::before {
  content: "✗";
  position: absolute;
  left: 0;
  color: var(--color-danger);
  font-weight: 700;
}

.presets-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.preset-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
}

.preset-btn:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.preset-icon {
  font-size: 1.5rem;
}

.preset-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-align: center;
}

/* Inventory Section */
.inventory-section {
  padding: 48px 0;
  background: var(--color-surface);
}

.inventory-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.search-filter {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.search-input {
  padding: 10px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  min-width: 200px;
}

.filter-select {
  padding: 10px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  background: var(--color-surface);
}

.inventory-actions {
  display: flex;
  gap: 8px;
}

.inventory-actions .btn {
  padding: 10px 16px;
  font-size: 0.875rem;
}

/* Inventory Table */
.inventory-table-container {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--color-text-light);
}

.empty-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
  color: var(--color-text);
}

.inventory-table {
  width: 100%;
  border-collapse: collapse;
}

.inventory-table th {
  background: var(--color-bg);
  padding: 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-text-light);
  border-bottom: 1px solid var(--color-border);
}

.inventory-table td {
  padding: 16px;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.875rem;
}

.inventory-table tr:hover {
  background: var(--color-bg);
}

.col-photo {
  width: 80px;
}

.col-photo img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.col-name {
  font-weight: 600;
}

.col-category {
  text-transform: capitalize;
}

.col-condition {
  text-transform: capitalize;
}

.col-price {
  font-weight: 600;
  color: var(--color-success);
}

.col-actions {
  width: 120px;
}

.row-actions {
  display: flex;
  gap: 8px;
}

.row-btn {
  padding: 6px 12px;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
  transition: all var(--transition);
}

.row-btn:hover {
  background: var(--color-bg);
}

.row-btn.edit {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.row-btn.delete {
  color: var(--color-danger);
  border-color: var(--color-danger);
}

/* Guide Section */
.guide-section {
  padding: 48px 0;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.guide-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.guide-icon {
  width: 48px;
  height: 48px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.guide-icon svg {
  width: 24px;
  height: 24px;
}

.guide-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.guide-card p {
  color: var(--color-text-light);
  font-size: 0.9375rem;
}

.guide-scenario {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 48px;
}

.guide-scenario h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.scenario-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.scenario-content p {
  color: var(--color-text-light);
}

.guide-faq {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.guide-faq h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-item summary {
  padding: 16px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--color-text-light);
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  padding: 0 20px 16px;
  color: var(--color-text-light);
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal[hidden] {
  display: none;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
}

.modal-content {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--color-bg);
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-body {
  padding: 32px;
}

.modal-photos {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.modal-photos img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.modal-details {
  display: grid;
  gap: 16px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.detail-label {
  font-weight: 600;
  color: var(--color-text-light);
}

.detail-value {
  font-weight: 500;
}

/* Footer */
.site-footer {
  background: var(--color-text);
  color: white;
  padding: 48px 0 24px;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo {
  font-weight: 700;
  font-size: 1.125rem;
}

.footer-tagline {
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
}

/* Responsive */
@media (max-width: 1024px) {
  .logger-layout {
    grid-template-columns: 1fr;
  }
  
  .logger-sidebar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 16px;
  }
  
  .hero-content h1 {
    font-size: 1.75rem;
  }
  
  .hero-stats {
    gap: 24px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .inventory-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-filter {
    flex-direction: column;
  }
  
  .search-input {
    min-width: auto;
  }
  
  .inventory-actions {
    justify-content: center;
  }
  
  .inventory-table {
    font-size: 0.75rem;
  }
  
  .inventory-table th,
  .inventory-table td {
    padding: 12px 8px;
  }
  
  .col-photo img {
    width: 40px;
    height: 40px;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  
  .logger-form-container {
    padding: 20px;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .presets-grid {
    grid-template-columns: 1fr;
  }
  
  .inventory-actions {
    flex-direction: column;
  }
  
  .inventory-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Print Styles */
@media print {
  .site-header,
  .logger-section,
  .inventory-controls,
  .guide-section,
  .site-footer,
  .row-actions {
    display: none !important;
  }
  
  .inventory-section {
    padding: 0;
  }
  
  .inventory-table {
    font-size: 10pt;
  }
  
  .inventory-table th,
  .inventory-table td {
    padding: 8px;
  }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
