/* Hestia - Application Styles */

:root {
  --color-bg: #f4f4f5;
  --color-surface: #ffffff;
  --color-text: #1a1a2e;
  --color-text-muted: #71717a;
  --color-text-secondary: #3f3f46;
  --color-border: #e4e4e7;
  --color-primary: #6d28d9;
  --color-primary-hover: #5b21b6;
  --color-danger: #dc2626;
  --color-danger-hover: #b91c1c;
  --color-success: #16a34a;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.1);
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* Navigation */
.main-nav {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-brand {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.5px;
}
.nav-brand:hover { text-decoration: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
}

.nav-links a { color: var(--color-text-secondary); font-weight: 500; }
.nav-links a:hover { color: var(--color-primary); text-decoration: none; }

.nav-user {
  color: var(--color-text-muted);
  font-size: 13px;
  padding-left: 12px;
  border-left: 1px solid var(--color-border);
}

.nav-signout {
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 13px;
  padding: 4px 12px;
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-signout:hover { background: var(--color-bg); color: var(--color-text); }

/* Container */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* Flash Messages */
.flash {
  max-width: 1100px;
  margin: 16px auto 0;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
}
.flash-notice { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.flash-alert { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s, box-shadow 0.15s;
  line-height: 1.4;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-hover); box-shadow: var(--shadow); }

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

.btn-danger { background: var(--color-danger); color: #fff; }
.btn-danger:hover { background: var(--color-danger-hover); }

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-full { width: 100%; text-align: center; }

.btn-link { background: none; border: none; color: var(--color-primary); cursor: pointer; font-size: 14px; padding: 0; }
.btn-link:hover { text-decoration: underline; }
.btn-link-danger { color: var(--color-danger); }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  background: var(--color-surface);
  transition: border-color 0.15s;
}
.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.1);
}

.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }

.form-check { display: flex; align-items: center; gap: 8px; }
.form-checkbox { width: 18px; height: 18px; accent-color: var(--color-primary); }

.form-hint {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 4px 0 0;
}

.cc-recipients {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}
.cc-recipients legend {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-secondary);
  padding: 0 4px;
}
.cc-recipient-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  cursor: pointer;
  font-size: 15px;
}
.cc-recipient-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
}

.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 24px; }

.form-errors {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 24px;
  color: #991b1b;
  font-size: 14px;
}
.form-errors ul { margin: 8px 0 0; padding-left: 20px; }
.form-errors h3 { margin: 0; font-size: 14px; }

/* Landing Page */
.landing-hero {
  min-height: 70vh;
  background: linear-gradient(135deg, #1a1a2e 0%, #4a1d96 50%, #6d28d9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-overlay {
  width: 100%;
  padding: 64px 24px;
}

.hero-content {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  color: #fff;
}

.hero-title {
  font-size: 64px;
  font-weight: 800;
  margin: 0 0 12px;
  letter-spacing: -2px;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 20px;
  font-weight: 400;
  opacity: 0.85;
  margin: 0 0 24px;
  font-style: italic;
}

.hero-description {
  font-size: 17px;
  line-height: 1.7;
  opacity: 0.9;
  margin: 0 0 36px;
}

.hero-cta {
  display: inline-block;
  padding: 16px 40px;
  background: #fff;
  color: var(--color-primary);
  font-size: 17px;
  font-weight: 700;
  border-radius: 50px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

.landing-features {
  max-width: 900px;
  margin: 0 auto;
  padding: 64px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px;
}

.feature {
  text-align: center;
}

.feature-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.feature h3 {
  font-size: 18px;
  margin: 0 0 8px;
  color: var(--color-text);
}

.feature p {
  font-size: 15px;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0;
}

/* Auth Page */
.auth-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px 36px;
  max-width: 420px;
  width: 100%;
}

.auth-card h1 {
  font-size: 24px;
  margin: 0 0 8px;
  text-align: center;
}

.auth-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 15px;
  margin: 0 0 28px;
}

.auth-form .form-group { margin-bottom: 24px; }

/* Items */
.items-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.items-header h1 { margin: 0; font-size: 24px; }

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.item-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s, transform 0.15s;
}
.item-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.item-photo img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.item-info {
  padding: 16px;
}

.item-info h3 {
  margin: 0 0 4px;
  font-size: 16px;
}
.item-info h3 a { color: var(--color-text); }
.item-info h3 a:hover { color: var(--color-primary); text-decoration: none; }

.item-location {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.item-owner {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.item-destination {
  display: inline-block;
  padding: 2px 10px;
  background: #dbeafe;
  color: #1d4ed8;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 8px;
}
.item-destination-pending {
  background: #f4f4f5;
  color: var(--color-text-muted);
}

.item-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }

.tag {
  display: inline-block;
  padding: 2px 10px;
  background: #ede9fe;
  color: #6d28d9;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 500;
}

.item-decisions-summary { margin-top: 8px; }
.decision-count {
  font-size: 13px;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* Item Show */
.item-show-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

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

.item-show-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.item-show-image-col {
  position: sticky;
  top: 80px;
}

.item-show-photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: var(--shadow);
  cursor: pointer;
  position: relative;
  aspect-ratio: 1 / 1;
}
.item-show-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.item-show-photo-hint {
  position: absolute;
  bottom: 8px;
  right: 10px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 8px;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.item-show-photo:hover .item-show-photo-hint { opacity: 1; }

.item-show-photo-sm { max-width: 400px; }

.item-show-detail-col h1 { margin: 0 0 16px; font-size: 28px; }

.item-show-meta {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}
.item-show-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--color-border);
}
.item-show-meta-row:last-child { border-bottom: none; }
.item-show-meta-label {
  font-weight: 600;
  color: var(--color-text-secondary);
}

.item-meta {
  font-size: 14px;
  color: var(--color-text-muted);
  margin: 0 0 12px;
}

.item-description {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text-secondary);
}
.item-description p { margin: 4px 0 0; }
.item-description-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text-secondary);
}

.item-decisions-pending h3 {
  font-size: 14px;
  color: var(--color-text-muted);
  margin: 16px 0 8px;
}

.back-link {
  font-size: 14px;
  color: var(--color-text-muted);
  font-weight: 500;
}
.back-link:hover { color: var(--color-primary); }

/* Image Zoom Modal */
.image-zoom-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.image-zoom-modal.image-zoom-open {
  display: flex;
}
.image-zoom-modal img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
  cursor: zoom-in;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transform-origin: center center;
  transition: none;
  user-select: none;
  -webkit-user-drag: none;
}
.image-zoom-close {
  position: fixed;
  top: 16px;
  right: 20px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 12px;
  border-radius: 50%;
  z-index: 1002;
}
.image-zoom-close:hover { color: #fff; background: rgba(0, 0, 0, 0.7); }

/* Decisions Section */
.item-decisions-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}
.item-decisions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.item-decisions-section h2 {
  font-size: 20px;
  margin: 0;
}
.item-decisions-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.decisions-list { margin-top: 16px; }

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

.decision-user { font-size: 14px; font-weight: 500; }

.decision-choice {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  background: var(--color-primary);
  color: #fff;
}

.muted { color: var(--color-text-muted); font-size: 14px; }

/* Decisions Table */
.decisions-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.decisions-table th, .decisions-table td {
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
}
.decisions-table thead th {
  background: var(--color-bg);
  font-weight: 600;
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
}
.decisions-table tbody tr { border-bottom: 1px solid var(--color-border); }
.decisions-table tbody tr:last-child { border-bottom: none; }

.pending-list {
  font-size: 14px;
  color: var(--color-text-muted);
  padding-left: 20px;
}

.decision-role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.decision-role-owner {
  background: var(--color-primary-light, #e0e7ff);
  color: var(--color-primary, #4f46e5);
}
.decision-role-cc {
  background: var(--color-bg);
  color: var(--color-text-muted);
}

.pending-remove-cell {
  width: 40px;
  text-align: center;
}
.pending-remove-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius);
  line-height: 1;
}
.pending-remove-btn:hover {
  color: var(--color-danger, #dc2626);
  background: var(--color-danger-light, #fef2f2);
}

.item-decisions-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.add-cc-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
}
.add-cc-modal.modal-open {
  display: flex;
}
.add-cc-modal-content {
  background: var(--color-surface, #fff);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
  margin: 16px;
}
.add-cc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
}
.add-cc-modal-header h3 {
  margin: 0;
  font-size: 16px;
}
.add-cc-modal-close {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.add-cc-modal-close:hover {
  color: var(--color-text);
}
.add-cc-modal-hint {
  padding: 12px 20px 0;
  margin: 0;
  font-size: 13px;
  color: var(--color-text-muted);
}
.add-cc-user-list {
  list-style: none;
  padding: 8px 0;
  margin: 0;
}
.add-cc-user-list li {
  border-bottom: 1px solid var(--color-border);
}
.add-cc-user-list li:last-child {
  border-bottom: none;
}
.add-cc-user-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 20px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  gap: 12px;
}
.add-cc-user-btn:hover {
  background: var(--color-bg);
}
.add-cc-user-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
}
.add-cc-user-email {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* Inline Decision Modal */
.inline-decision-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
}
.inline-decision-modal.modal-open {
  display: flex;
}
.inline-decision-modal-content {
  background: var(--color-surface, #fff);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 440px;
  max-height: 80vh;
  overflow-y: auto;
  margin: 16px;
}
.inline-decision-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
}
.inline-decision-modal-header h3 {
  margin: 0;
  font-size: 16px;
}
.inline-decision-modal-close {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.inline-decision-modal-close:hover {
  color: var(--color-text);
}
.inline-decision-modal-body {
  padding: 16px 20px 20px;
}
.inline-decision-modal-body .decision-comment-field {
  margin-top: 0;
  margin-bottom: 16px;
}
.inline-decision-modal-body .decision-buttons {
  margin-top: 0;
}
.item-destination-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.btn-preference {
  background: var(--color-surface, #fff);
  color: var(--color-primary, #2563eb);
  border: 1.5px solid var(--color-primary, #2563eb);
  border-radius: var(--radius);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.btn-preference:hover {
  background: var(--color-primary, #2563eb);
  color: #fff;
}
/* Decision Page (from email) */
/* Decision Page — mirrors item-show layout */

.decision-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

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

.decision-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.decision-image-col {
  position: sticky;
  top: 80px;
}

.decision-photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: var(--shadow);
  aspect-ratio: 1 / 1;
}

.decision-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.decision-detail-col h1 {
  font-size: 24px;
  margin: 0 0 8px;
}

.decision-meta {
  font-size: 15px;
  color: var(--color-text-secondary);
  margin: 0 0 8px;
}

.decision-description {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 8px 0 0;
}

.decision-recorded {
  padding: 14px 20px;
  background: #ecfdf5;
  border-radius: var(--radius);
  margin-top: 20px;
}

.decision-change-link {
  font-size: 14px;
  color: var(--color-text-secondary);
  text-decoration: underline;
}

.decision-nav {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.decision-signin-hint {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin: 0;
}

.decision-discovery {
  margin-top: 20px;
  padding: 16px 20px;
  background: var(--color-bg);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.discovery-counts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.discovery-heading {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}
.discovery-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.discovery-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  color: var(--color-text-secondary);
}
.discovery-badge strong {
  font-size: 16px;
}
.discovery-badge-owned {
  background: #ede9fe;
  color: #5b21b6;
}
.discovery-badge-cc {
  background: #e0f2fe;
  color: #0369a1;
}
.discovery-signin {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-muted);
}

.decision-comment-field {
  margin-top: 20px;
}

.decision-comment-label {
  font-size: 14px;
  color: var(--color-text-secondary);
  display: block;
  margin-bottom: 6px;
}

.decision-form .form-input {
  width: 100%;
  resize: vertical;
}

.decision-buttons {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-decision {
  width: 100%;
  padding: 12px 20px;
  border: none;
  cursor: pointer;
  text-align: center;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius);
  transition: transform 0.1s, box-shadow 0.1s;
}
.btn-decision:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: #fff;
}

.btn-decision-disposition { background: #6d28d9; }
.btn-decision-disposition:hover { background: #5b21b6; }
.btn-decision-place { background: #2563eb; }
.btn-decision-place:hover { background: #1d4ed8; }

.decision-divider {
  margin: 12px 0 4px;
  font-size: 13px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.decision-comment {
  font-size: 14px;
  color: var(--color-text-secondary);
  font-style: italic;
  margin: 4px 0 0;
}

/* Admin */
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.admin-header h1 { margin: 0; font-size: 24px; }

.breadcrumb {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}
.breadcrumb a { color: var(--color-text-secondary); }
.breadcrumb a:hover { color: var(--color-primary); }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.admin-table th, .admin-table td {
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
}
.admin-table thead th {
  background: var(--color-bg);
  font-weight: 600;
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
}
.admin-table tbody tr { border-bottom: 1px solid var(--color-border); }
.admin-table tbody tr:last-child { border-bottom: none; }

.table-actions { display: flex; gap: 12px; justify-content: flex-end; }

.admin-form { max-width: 520px; }

/* Empty State */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--color-text-muted);
  font-size: 16px;
}
.empty-state .btn { margin-top: 16px; }

/* Photo Preview */
.photo-preview {
  margin-top: 12px;
  display: inline-block;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* Reports */
.report-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}
.report-header h1 { margin: 0; font-size: 24px; }
.report-subtitle { margin: 4px 0 0; font-size: 14px; color: var(--color-text-muted); }

.dest-overview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}
.dest-overview-bar {
  flex: 1;
  height: 8px;
  background: var(--color-border);
  border-radius: 4px;
  overflow: hidden;
}
.dest-overview-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 4px;
  transition: width 0.3s ease;
}
.dest-overview-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.dest-group { margin-bottom: 32px; }
.dest-group-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin: 0 0 12px;
  font-weight: 600;
}

.dest-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.dest-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--color-text);
  transition: box-shadow 0.15s, transform 0.15s;
  border-left: 4px solid transparent;
}
.dest-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  text-decoration: none;
}
.dest-card-disposition { border-left-color: var(--color-primary); }
.dest-card-place { border-left-color: #2563eb; }

.dest-card-count {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
  color: var(--color-text);
}
.dest-card-name {
  font-size: 15px;
  font-weight: 600;
  margin-top: 6px;
  color: var(--color-text-secondary);
}
.dest-card-action {
  font-size: 12px;
  color: var(--color-primary);
  margin-top: 10px;
  font-weight: 500;
}

.dest-undecided-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--color-border);
}
.dest-undecided-card .dest-card-count {
  font-size: 28px;
}
.dest-undecided-card .dest-card-label {
  flex: 1;
  font-size: 14px;
  color: var(--color-text-muted);
}

/* Packing List */
.packing-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}
.packing-header h1 { margin: 4px 0 0; font-size: 24px; }

.packing-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 900px) {
  .packing-list { grid-template-columns: 1fr; }
}
.packing-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.packing-row-photo { flex-shrink: 0; }
.packing-thumb {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  cursor: pointer;
}
@media (max-width: 480px) {
  .packing-thumb { width: 72px; height: 72px; }
  .packing-row { gap: 12px; padding: 10px 12px; }
}
.packing-no-photo { color: var(--color-text-muted); }
.packing-row-details { flex: 1; min-width: 0; }
.packing-row-title { font-size: 15px; font-weight: 500; }
.packing-row-title a { color: var(--color-primary); text-decoration: none; }
.packing-row-title a:hover { text-decoration: underline; }
.packing-row-meta {
  margin-top: 4px;
  font-size: 13px;
  color: var(--color-text-secondary);
}
.packing-row-room::after {
  content: " · ";
}
.packing-tags {
  display: block;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* Search & Filter Bar */
.search-bar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px 20px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}
.search-field { flex: 1; min-width: 180px; }
.search-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.search-field input,
.search-field select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  background: var(--color-surface);
}
.search-field input:focus,
.search-field select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.1);
}
.search-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.items-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.items-result-count {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

/* View Toggle */
.view-toggle {
  display: flex;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.view-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--color-surface);
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: background 0.15s, color 0.15s;
}
.view-toggle-btn:not(:last-child) {
  border-right: 1px solid var(--color-border);
}
.view-toggle-btn:hover {
  background: var(--color-bg);
  color: var(--color-text);
}
.view-toggle-btn.view-toggle-active {
  background: var(--color-primary);
  color: #fff;
}

/* Compact View */
.items-compact {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.items-compact > div {
  border-bottom: 1px solid var(--color-border);
}
.items-compact > div:last-child {
  border-bottom: none;
}
.item-compact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  color: var(--color-text);
  text-decoration: none;
  transition: background 0.1s;
}
.item-compact-row:hover {
  background: var(--color-bg);
  text-decoration: none;
}
.item-compact-thumb {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--color-bg);
}
.item-compact-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.item-compact-content {
  flex: 1;
  min-width: 0;
}
.item-compact-line1 {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.item-compact-spacer {
  flex: 1;
}
.item-compact-title {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-compact-line2 {
  font-size: 13px;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* Bulk Upload */
.bulk-upload {
  max-width: 680px;
  margin: 0 auto;
}

.bulk-upload-header {
  margin-bottom: 24px;
}

.bulk-upload-header h1 {
  margin: 12px 0 0;
  font-size: 24px;
}

.upload-zone {
  position: relative;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  background: var(--color-surface);
}

.upload-zone:hover {
  border-color: var(--color-primary);
  background: rgba(109, 40, 217, 0.02);
}

.upload-zone.drag-over {
  border-color: var(--color-primary);
  background: rgba(109, 40, 217, 0.06);
  transform: scale(1.01);
  box-shadow: 0 0 0 4px rgba(109, 40, 217, 0.08);
}

.upload-zone-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-zone-icon {
  color: var(--color-text-muted);
  margin-bottom: 12px;
  transition: color 0.2s, transform 0.2s;
}

.upload-zone:hover .upload-zone-icon,
.upload-zone.drag-over .upload-zone-icon {
  color: var(--color-primary);
  transform: translateY(-2px);
}

.upload-zone-text {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 4px;
}

.upload-zone-or {
  font-size: 14px;
  color: var(--color-text-muted);
  margin: 0 0 12px;
}

/* Upload File List */
.upload-file-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.upload-file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  font-size: 14px;
  animation: fadeSlideIn 0.25s ease;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.upload-file-name {
  flex-shrink: 0;
  min-width: 0;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.upload-progress {
  flex: 1;
  height: 6px;
  background: var(--color-bg);
  border-radius: 3px;
  overflow: hidden;
}

.upload-progress-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 3px;
  width: 0%;
  transition: width 0.2s ease;
}

.upload-complete .upload-progress-fill {
  background: var(--color-success);
}

.upload-status {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--color-text-muted);
  min-width: 70px;
  text-align: right;
}

.upload-complete .upload-status {
  color: var(--color-success);
  font-weight: 600;
}

.upload-error .upload-status,
.upload-status-error {
  color: var(--color-danger);
  font-weight: 500;
}

.upload-error {
  border-color: rgba(220, 38, 38, 0.2);
  background: rgba(220, 38, 38, 0.03);
}

/* Wizard */
.wizard {
  max-width: 960px;
  margin: 0 auto;
}

.wizard-header {
  margin-bottom: 24px;
}

.wizard-header-top {
  margin-bottom: 16px;
}

.wizard-header-top h1 {
  margin: 12px 0 0;
  font-size: 24px;
}

.wizard-progress {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wizard-progress-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.wizard-progress-bar {
  flex: 1;
  height: 8px;
  background: var(--color-border);
  border-radius: 4px;
  overflow: hidden;
}

.wizard-progress-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.wizard-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.wizard-photo {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: sticky;
  top: 72px;
}

.wizard-photo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: contain;
  background: var(--color-bg);
}

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

.wizard-secondary-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

/* Duplicate Warning */
.wizard-duplicate-warning {
  margin-bottom: 20px;
  border: 1px solid #d97706;
  border-radius: var(--radius);
  background: #fffbeb;
  padding: 14px 16px;
}

.duplicate-warning-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.duplicate-warning-icon {
  flex-shrink: 0;
  color: #d97706;
}

.duplicate-warning-text {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.4;
}

.duplicate-warning-text strong {
  display: block;
  color: #92400e;
  margin-bottom: 2px;
}

.duplicate-warning-text p {
  margin: 0;
  color: #78350f;
}

.duplicate-warning-thumb {
  flex-shrink: 0;
}

.duplicate-warning-thumb img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid #d97706;
}

/* Print Styles */
@media print {
  .main-nav, .flash, .no-print, .back-link, .packing-header .btn { display: none !important; }
  .container { padding: 0; max-width: 100%; }
  body { background: #fff; }
  .packing-header { margin-bottom: 16px; }
  .packing-list { grid-template-columns: 1fr; gap: 0; }
  .packing-row { box-shadow: none; border: 1px solid #ccc; border-radius: 0; }
  .packing-thumb { width: 64px; height: 64px; cursor: default; }
}

/* Responsive */
@media (max-width: 768px) {
  .item-show-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .item-show-image-col {
    position: static;
  }
  .decision-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .decision-image-col {
    position: static;
  }
  .wizard-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .wizard-photo {
    position: static;
  }
}

@media (max-width: 640px) {
  .hero-title { font-size: 40px; }
  .hero-subtitle { font-size: 17px; }
  .nav-inner { padding: 0; }
  .nav-links { gap: 12px; font-size: 13px; }
  .nav-user { display: none; }
  .form-row { flex-direction: column; gap: 0; }
  .items-header { flex-direction: column; gap: 12px; align-items: flex-start; }
  .item-show-header { flex-direction: column; gap: 12px; align-items: flex-start; }
  .report-header { flex-direction: column; gap: 12px; }
  .packing-header { flex-direction: column; gap: 12px; }
  .search-bar { flex-direction: column; align-items: stretch; }
  .search-field { min-width: 100%; }
  .dest-undecided-card { flex-direction: column; text-align: center; }
}
