:root {
  --card-radius: 1rem;
}

body {
  min-height: 100vh;
}

.top-user-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(13, 110, 253, 0.18);
  color: #6ea8fe;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  border: 1px solid rgba(110, 168, 254, 0.28);
}

.card {
  border-radius: var(--card-radius);
}

.search-box {
  min-width: 320px;
}

.stat-card .card-body {
  padding: 1rem 1.1rem;
}

.stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
}

.small-date {
  font-size: 1.1rem;
}

.note-body {
  white-space: pre-wrap;
}

.section-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.customer-summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
}

.customer-overview-card {
  min-width: 0;
}

.customer-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: stretch;
}

.customer-top-action {
  min-width: 180px;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  padding: 0.8rem 1rem;
  border-radius: 0.9rem;
  background: #fff;
}

.customer-top-action-label {
  font-weight: 600;
}

.customer-top-action-meta {
  font-size: 0.82rem;
  color: #6c757d;
}

@media (max-width: 1200px) {
  .customer-summary-row {
    grid-template-columns: 1fr;
  }
}

.form-toggle-panel {
  border-top: 1px dashed rgba(0, 0, 0, 0.12);
  margin-top: 0.5rem;
  padding-top: 1rem;
}

.clean-accordion {
  --bs-accordion-border-color: rgba(0, 0, 0, 0.08);
  --bs-accordion-btn-bg: #f8f9fa;
  --bs-accordion-active-bg: #eef4ff;
  --bs-accordion-active-color: inherit;
  --bs-accordion-btn-focus-box-shadow: none;
}

.clean-accordion .accordion-item {
  border-radius: 0.9rem;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.clean-accordion .accordion-button {
  padding: 1rem 1.1rem;
  align-items: flex-start;
}

.clean-accordion .accordion-button:not(.collapsed) {
  box-shadow: none;
}

.clean-accordion .accordion-body {
  background: #fff;
}

.item-summary {
  min-width: 0;
  display: block;
}

.item-title {
  display: block;
  font-weight: 600;
}

.item-meta {
  display: block;
  margin-top: 0.15rem;
  color: #6c757d;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.asset-subsection {
  border-top: 1px dashed rgba(0, 0, 0, 0.12);
  padding-top: 1rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.file-actions {
  display: inline-flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.file-preview-surface {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 1rem;
  background: #f8f9fa;
  padding: 1rem;
}

.image-surface {
  display: flex;
  justify-content: center;
}

.file-preview-image,
.file-preview-video {
  max-width: 100%;
  max-height: 75vh;
  border-radius: 0.75rem;
}

.file-preview-frame {
  width: 100%;
  min-height: 78vh;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 1rem;
  background: white;
}

.file-preview-text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  background: #111827;
  color: #e5eefb;
  border-radius: 1rem;
  padding: 1rem 1.1rem;
  max-height: 78vh;
  overflow: auto;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.photo-card {
  display: block;
  position: relative;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 0.85rem;
  overflow: hidden;
  background: white;
  color: inherit;
  transition: transform .12s ease, box-shadow .12s ease;
}

.photo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,.08);
}

.photo-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  background: #e9ecef;
}

.photo-preview-chip {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.78);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(6px);
}

.photo-preview-chip svg {
  width: 0.95rem;
  height: 0.95rem;
}

.photo-caption {
  padding: 0.85rem;
}

.file-preview-doc {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 1rem;
  padding: 1.5rem;
  line-height: 1.65;
}

.file-preview-doc p:last-child {
  margin-bottom: 0;
}

@media (max-width: 992px) {
  .search-box {
    min-width: 220px;
  }
}
