/* Cards */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.card.card-hover:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
  gap: var(--space-2);
}
.card-title { margin: 0; font-size: 1rem; font-weight: 600; }
.card-body { color: var(--color-text-soft); }

/* Stat cards */
.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; right: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, currentColor 0%, transparent 70%);
  opacity: 0.05;
  pointer-events: none;
  transition: all var(--transition);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-card:hover::after { transform: scale(1.2); }
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--color-primary);
}
.stat-card.stat-success::before { background: linear-gradient(90deg, var(--color-success), #34d399); }
.stat-card.stat-warning::before { background: linear-gradient(90deg, var(--color-warning), #fbbf24); }
.stat-card.stat-danger::before { background: linear-gradient(90deg, var(--color-danger), #f87171); }
.stat-card.stat-info::before { background: linear-gradient(90deg, var(--color-info), #38bdf8); }
.stat-card.stat-review::before { background: linear-gradient(90deg, var(--color-review), #e879f9); }
.stat-card.success::after { color: var(--color-success); }
.stat-card.warning::after { color: var(--color-warning); }
.stat-card.danger::after { color: var(--color-danger); }
.stat-card.info::after { color: var(--color-info); }
.stat-card.review::after { color: var(--color-review); }
.stat-card-label { font-size: 0.85rem; color: var(--color-text-soft); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.stat-card-value {
  font-size: 2.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--color-text), var(--color-text-soft));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}
.stat-card-footer { font-size: 0.8rem; color: var(--color-text-muted); margin-top: auto; }

/* Stat mini cards (colorful tiles for filter shortcuts) */
.stat-mini {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-mini:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: inherit;
}
.stat-mini.is-active {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow-primary);
}
.stat-mini-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.stat-mini-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat-mini-label {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.stat-mini-value {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}
.stat-mini-available {
  background: linear-gradient(135deg, var(--color-surface), var(--color-info-light));
  border-color: var(--color-info);
}
.stat-mini-available .stat-mini-icon { background: var(--color-info); color: white; }
.stat-mini-mine {
  background: linear-gradient(135deg, var(--color-surface), var(--color-warning-light));
  border-color: var(--color-warning);
}
.stat-mini-mine .stat-mini-icon { background: var(--color-warning); color: white; }
.stat-mini-done {
  background: linear-gradient(135deg, var(--color-surface), var(--color-success-light));
  border-color: var(--color-success);
}
.stat-mini-done .stat-mini-icon { background: var(--color-success); color: white; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1.2;
}
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-lg { padding: var(--space-3) var(--space-5); font-size: 1rem; }
.btn-block { display: flex; width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: linear-gradient(135deg, var(--color-primary), var(--color-accent)); color: white; border: 0; box-shadow: 0 1px 2px rgba(79, 70, 229, 0.4); }
.btn-primary:hover { color: white; transform: translateY(-1px); box-shadow: 0 8px 16px -2px rgba(79, 70, 229, 0.5); }

.btn-secondary { background: var(--color-surface); color: var(--color-text); border-color: var(--color-border); }
.btn-secondary:hover { background: var(--color-surface-2); color: var(--color-text); border-color: var(--color-border-strong); }

.btn-success { background: linear-gradient(135deg, var(--color-success), #34d399); color: white; border: 0; box-shadow: 0 1px 2px rgba(16, 185, 129, 0.4); }
.btn-success:hover { color: white; transform: translateY(-1px); box-shadow: 0 8px 16px -2px rgba(16, 185, 129, 0.5); }

.btn-danger { background: linear-gradient(135deg, var(--color-danger), #f87171); color: white; border: 0; box-shadow: 0 1px 2px rgba(239, 68, 68, 0.4); }
.btn-danger:hover { color: white; transform: translateY(-1px); box-shadow: 0 8px 16px -2px rgba(239, 68, 68, 0.5); }

.btn-warning { background: linear-gradient(135deg, var(--color-warning), #fbbf24); color: white; border: 0; box-shadow: 0 1px 2px rgba(245, 158, 11, 0.4); }
.btn-warning:hover { color: white; transform: translateY(-1px); box-shadow: 0 8px 16px -2px rgba(245, 158, 11, 0.5); }

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

.btn-ghost { background: transparent; color: var(--color-text-soft); }
.btn-ghost:hover { background: var(--color-surface-2); color: var(--color-text); }

/* Forms */
.form-group { margin-bottom: var(--space-4); }
.form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
}
.form-label .required { color: var(--color-danger); }
.form-hint { display: block; font-size: 0.8rem; color: var(--color-text-muted); margin-top: var(--space-1); }
.form-control {
  width: 100%;
  padding: 10px var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  transition: all var(--transition);
  font-size: 0.95rem;
}
.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
textarea.form-control { resize: vertical; min-height: 100px; line-height: 1.5; }
select.form-control { cursor: pointer; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-4); }
.form-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-5);
  flex-wrap: wrap;
}

/* Inline delete icon button */
.btn-icon-danger {
  background: transparent;
  border: 1px solid transparent;
  color: var(--color-text-muted);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  margin-left: auto;
  flex-shrink: 0;
  transition: all var(--transition);
}
.btn-icon-danger:hover {
  background: var(--color-danger);
  color: white;
  border-color: var(--color-danger);
}
.btn-icon-danger--inline {
  width: 22px;
  height: 22px;
  font-size: 14px;
}
.chat-meta {
  display: flex !important;
  align-items: center !important;
  gap: var(--space-2) !important;
  justify-content: space-between !important;
}
.chat-meta > span:first-child { flex: 1; }

.timeline-head {
  flex-wrap: wrap;
}

/* View mode toggle */
.view-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: var(--space-2);
  white-space: nowrap;
}
.view-mode-badge.is-admin {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: white;
}
.view-mode-badge.is-tech {
  background: linear-gradient(135deg, var(--color-success), #34d399);
  color: white;
}
.view-mode-toggle {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-soft);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  transition: all var(--transition);
}
.view-mode-toggle:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-color: var(--color-primary);
  transform: rotate(180deg);
}

/* Material stock pills */
.stock-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
}
.stock-pill-ok      { background: var(--color-success-light); color: var(--color-success); }
.stock-pill-warning { background: var(--color-warning-light); color: var(--color-warning); }
.stock-pill-danger  { background: var(--color-danger-light); color: var(--color-danger); }

.row-warn td  { background: rgba(245, 158, 11, 0.06); }
.row-danger td { background: rgba(239, 68, 68, 0.06); }

/* Material transaction timeline variants */
.mat-tx.mat-import::before { background: var(--color-success); }
.mat-tx.mat-issue::before  { background: var(--color-primary); }
.mat-tx.mat-use::before    { background: var(--color-review); }
.mat-tx.mat-return::before { background: var(--color-info); }
.mat-tx.mat-adjust::before { background: var(--color-warning); }

/* Material grid for KT inventory */
.material-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.material-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}
.material-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-info), var(--color-primary));
}
.material-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}
.material-card-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}
.material-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-info-light), var(--color-primary-light));
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.material-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}
.material-code {
  font-size: 0.75rem;
  background: var(--color-surface-2);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--color-text-muted);
}
.material-stock {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: var(--space-2);
}
.material-stock-value {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}
.material-stock-unit {
  color: var(--color-text-soft);
  font-size: 0.9rem;
  font-weight: 600;
}
.material-stock-label {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

/* Task page navigation (back link + admin actions) */
.task-page-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}
.admin-task-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* Form status (for AJAX submit feedback) */
.form-status {
  margin-left: var(--space-3);
  font-size: 0.85rem;
  color: var(--color-text-soft);
}
.form-status:not(:empty) {
  color: var(--color-warning);
  font-weight: 600;
}

/* Pills (badges) */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.badge--info     { background: var(--color-info-light);     color: var(--color-info); }
.badge--warning  { background: var(--color-warning-light);  color: var(--color-warning); }
.badge--success  { background: var(--color-success-light);  color: var(--color-success); }
.badge--danger   { background: var(--color-danger-light);   color: var(--color-danger); }
.badge--muted    { background: var(--color-surface-2);     color: var(--color-text-soft); }
.badge--review   { background: var(--color-review-light);   color: var(--color-review); }
.badge--primary  { background: var(--color-primary-light);  color: var(--color-primary); }

.prio--low      { background: var(--color-success-light); color: var(--color-success); }
.prio--medium   { background: var(--color-info-light); color: var(--color-info); }
.prio--high     { background: linear-gradient(135deg, #fde68a, var(--color-warning-light)); color: var(--color-warning); }
.prio--urgent   { background: linear-gradient(135deg, #fecaca, var(--color-danger-light)); color: var(--color-danger); animation: pulseUrgent 2s infinite; }

@keyframes pulseUrgent {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50%      { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.table th, .table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
.table th {
  background: var(--color-surface-2);
  font-weight: 600;
  color: var(--color-text-soft);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.table tbody tr {
  transition: background var(--transition);
}
.table tbody tr:hover {
  background: var(--color-surface-2);
}
.table tbody tr:last-child td { border-bottom: 0; }

/* Empty state */
.empty {
  text-align: center;
  padding: var(--space-10) var(--space-5);
  color: var(--color-text-soft);
}
.empty-icon { font-size: 3rem; margin-bottom: var(--space-3); opacity: 0.5; }
.empty h3 { color: var(--color-text-soft); font-weight: 500; }

/* Flash */
.flash-container {
  position: fixed;
  top: var(--space-5);
  right: var(--space-5);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
}
.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-weight: 500;
  min-width: 280px;
  animation: slideIn 0.3s ease-out;
  pointer-events: auto;
}
.flash-success { background: var(--color-success); color: white; }
.flash-error   { background: var(--color-danger); color: white; }
.flash-warning { background: var(--color-warning); color: white; }
.flash-info    { background: var(--color-info); color: white; }
.flash-close {
  background: transparent;
  border: 0;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.85;
  line-height: 1;
}
.flash-close:hover { opacity: 1; }
@keyframes slideIn {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-4);
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  animation: modalIn 0.2s ease-out;
}
@keyframes modalIn {
  from { transform: scale(0.95); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border);
}
.modal-header h3 { margin: 0; font-size: 1.1rem; }
.modal-close { background: transparent; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--color-text-soft); padding: 0; }
.modal-body { padding: var(--space-5); }
.modal-footer {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: var(--space-2);
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* Avatar list */
.avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-5);
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: var(--space-3) var(--space-4);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-weight: 500;
  color: var(--color-text-soft);
  font-size: 0.95rem;
  white-space: nowrap;
  transition: all var(--transition);
}
.tab:hover { color: var(--color-text); }
.tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 600;
}
.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  height: 18px;
  background: var(--color-surface-2);
  color: var(--color-text-soft);
  border-radius: 9px;
  font-size: 0.7rem;
  margin-left: var(--space-1);
}
.tab.active .tab-count { background: var(--color-primary-light); color: var(--color-primary); }

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--color-border-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--color-surface);
}
.upload-zone:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}
.upload-zone input[type="file"] { display: none; }
.upload-zone .upload-icon { font-size: 2.5rem; opacity: 0.6; margin-bottom: var(--space-2); }
.upload-zone .upload-text { font-weight: 600; }
.upload-zone .upload-hint { font-size: 0.85rem; color: var(--color-text-muted); margin-top: var(--space-1); }
.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-3);
}
.preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
}
.preview-item img { width: 100%; height: 100%; object-fit: cover; }
.preview-item .preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,0.7);
  color: white;
  border: 0;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-2);
}
.gallery a {
  display: block;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--color-border);
  position: relative;
  background: var(--color-surface-2);
  transition: all var(--transition);
}
.gallery a:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.gallery a::after {
  content: '🔍';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.55);
  color: white;
  font-size: 1.5rem;
  opacity: 0;
  transition: opacity var(--transition);
}
.gallery a:hover::after { opacity: 1; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition); }
.gallery a:hover img { transform: scale(1.06); }
.gallery-info {
  margin-top: var(--space-2);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
  backdrop-filter: blur(8px);
}
.lightbox-overlay.open { display: flex; }
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.lightbox-content {
  position: relative;
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.lightbox-image {
  max-width: 95vw;
  max-height: 78vh;
  border-radius: var(--radius-md);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  background: #0f172a;
  animation: zoomIn 0.25s ease-out;
}
@keyframes zoomIn {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.lightbox-caption {
  color: #f1f5f9;
  text-align: center;
  font-size: 0.9rem;
  max-width: 80ch;
  word-break: break-word;
  opacity: 0.9;
}
.lightbox-counter {
  color: rgba(241, 245, 249, 0.7);
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 12px;
  border-radius: 999px;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  backdrop-filter: blur(4px);
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.08);
}
.lightbox-close {
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  font-size: 22px;
  line-height: 1;
}
.lightbox-prev, .lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  font-size: 24px;
}
.lightbox-prev:hover, .lightbox-next:hover { transform: translateY(-50%) scale(1.08); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
