/* CAKRA - Work Log & Technical Activities Stylesheet */

.wl-container {
  padding: 18px 24px;
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* 1. Header Bar */
.wl-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px 20px;
}

.wl-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wl-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 10px;
  font-size: 1.4rem;
}

.wl-title-text h2 {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 3px 0;
  letter-spacing: 0.3px;
}

.wl-title-text p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.wl-actions-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* 2. KPI Summary Metric Cards */
.wl-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.wl-kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.wl-kpi-card:hover {
  border-color: var(--accent-color);
  transform: translateY(-1px);
}

.wl-kpi-info h4 {
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin: 0 0 6px 0;
}

.wl-kpi-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.wl-kpi-badge-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.wl-kpi-badge-icon.blue { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.wl-kpi-badge-icon.green { background: rgba(34, 197, 94, 0.12); color: #22c55e; }
.wl-kpi-badge-icon.amber { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.wl-kpi-badge-icon.purple { background: rgba(168, 85, 247, 0.12); color: #a855f7; }

/* 3. Filter & Controls Bar */
.wl-filter-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wl-filter-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.wl-preset-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.wl-chip-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 5px 13px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.wl-chip-btn:hover {
  color: var(--text-primary);
  background: var(--bg-surface-hover);
  border-color: var(--border-focus);
}

.wl-chip-btn.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: var(--brand-primary-text, #ffffff) !important;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

[data-theme="light"] .wl-chip-btn.active,
html.light .wl-chip-btn.active {
  background: #09090b;
  border-color: #09090b;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .wl-chip-btn.active,
html.dark .wl-chip-btn.active {
  background: #2C3E50;
  border-color: #A4C8E1;
  color: #F0F0F0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.wl-custom-date-range {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 4px 10px;
}

.wl-custom-date-range span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.wl-custom-date-range input[type="date"] {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.78rem;
  outline: none;
  font-family: inherit;
  cursor: pointer;
}

.wl-filter-row-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.wl-select {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 8px;
  outline: none;
  cursor: pointer;
}

.wl-select:focus {
  border-color: var(--border-focus);
}

.wl-search-wrap {
  flex: 1;
  min-width: 220px;
  position: relative;
  display: flex;
  align-items: center;
}

.wl-search-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.8rem;
  padding: 6px 12px 6px 32px;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s ease;
}

.wl-search-input:focus {
  border-color: var(--border-focus);
}

.wl-search-icon {
  position: absolute;
  left: 10px;
  color: var(--text-muted);
  font-size: 0.85rem;
  pointer-events: none;
}

.wl-btn-reset-filter {
  background: transparent;
  border: 1px dashed var(--border-color);
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.wl-btn-reset-filter:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
}

/* 4. Work Log Feed / Cards List */
.wl-feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wl-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease, border-color 0.15s ease;
  position: relative;
  cursor: pointer;
}

.wl-card:hover {
  border-color: var(--border-focus);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14);
}

.wl-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.wl-card-meta-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wl-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.wl-pill-date {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.wl-pill-site {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #3b82f6;
}

.wl-pill-category {
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.25);
  color: #a855f7;
}

.wl-pill-status.completed {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

.wl-pill-status.in_progress {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #3b82f6;
}

.wl-pill-status.pending {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

.wl-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wl-btn-icon {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 6px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}

.wl-btn-icon:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
  background: var(--bg-primary);
}

.wl-btn-icon.delete:hover {
  color: #ef4444;
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.wl-card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.wl-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.4;
  transition: color 0.15s ease;
}

.wl-card:hover .wl-card-title {
  color: var(--brand-cyan, #A4C8E1);
}

.wl-card-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-surface-hover);
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: transform 0.25s ease, background 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.wl-card.expanded .wl-card-chevron {
  transform: rotate(180deg);
  color: var(--text-primary);
  background: var(--border-subtle);
}

/* Expandable Drawer */
.wl-card-expandable {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, margin 0.25s ease, padding 0.25s ease;
  cursor: default;
}

.wl-card.expanded .wl-card-expandable {
  max-height: 3000px;
  opacity: 1;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-color);
}

.wl-card-desc {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-line;
  margin: 0;
}

/* Devices Chips */
.wl-devices-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.wl-device-chip {
  font-size: 0.72rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: 4px;
}

/* Photo Gallery Grid */
.wl-photo-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.wl-photo-thumb-wrap {
  position: relative;
  width: 100px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  cursor: pointer;
  background: #000;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.wl-photo-thumb-wrap:hover {
  transform: scale(1.04);
  border-color: var(--accent-color);
}

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

.wl-photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease;
  color: #ffffff;
  font-size: 1rem;
}

.wl-photo-thumb-wrap:hover .wl-photo-overlay {
  opacity: 1;
}

.wl-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
  margin-top: 4px;
}

.wl-pic-info {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
  color: var(--text-secondary);
}

.wl-card-footer-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.wl-card-badge-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.wl-card-expand-prompt {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.15s ease;
}

.wl-card:hover .wl-card-expand-prompt {
  color: var(--text-primary);
}

.wl-card.expanded .wl-card-expand-prompt {
  display: none;
}

/* Empty State */
.wl-empty-state {
  background: var(--bg-surface);
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  padding: 48px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.wl-empty-icon {
  font-size: 3rem;
  opacity: 0.6;
}

.wl-empty-state h3 {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin: 0;
}

.wl-empty-state p {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 420px;
  margin: 0;
}

/* 5. Modal Styling */
.wl-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.wl-modal-backdrop.active {
  display: flex;
}

.wl-modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  animation: wlModalSlide 0.2s ease;
}

@keyframes wlModalSlide {
  from { transform: translateY(15px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.wl-modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-primary);
}

.wl-modal-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wl-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.wl-modal-close:hover {
  color: var(--text-primary);
}

.wl-modal-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wl-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

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

.wl-form-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.wl-form-label span.req {
  color: #ef4444;
}

.wl-form-input,
.wl-form-select,
.wl-form-textarea {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.85rem;
  padding: 8px 12px;
  border-radius: 8px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.wl-form-input:focus,
.wl-form-select:focus,
.wl-form-textarea:focus {
  border-color: var(--accent-color);
}

.wl-form-textarea {
  resize: vertical;
  min-height: 100px;
}

/* Upload Dropzone */
.wl-upload-zone {
  border: 2px dashed var(--border-color);
  background: var(--bg-primary);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.wl-upload-zone:hover,
.wl-upload-zone.dragover {
  border-color: var(--accent-color);
  background: rgba(59, 130, 246, 0.04);
}

.wl-upload-icon {
  font-size: 2rem;
  opacity: 0.7;
}

.wl-upload-prompt {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.wl-upload-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 0;
}

/* Uploaded Photos Preview List in Form */
.wl-staged-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.wl-staged-photo-item {
  position: relative;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.wl-staged-photo-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
}

.wl-staged-photo-desc {
  padding: 6px;
}

.wl-staged-photo-desc input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.72rem;
  padding: 4px 6px;
  border-radius: 4px;
}

.wl-btn-remove-photo {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.wl-modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--bg-primary);
}

/* 6. Lightbox Modal */
.wl-lightbox-card {
  max-width: 900px;
  max-height: 90vh;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.wl-lightbox-img-wrap {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  max-height: 70vh;
}

.wl-lightbox-img {
  max-width: 100%;
  max-height: 68vh;
  object-fit: contain;
  border-radius: 4px;
}

.wl-lightbox-caption {
  padding: 12px 18px;
  color: #cbd5e1;
  font-size: 0.85rem;
  background: #1e293b;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 7. Print Report Modal & Styling */
.wl-report-modal-card {
  max-width: 960px;
}

.wl-printable-report {
  background: #ffffff;
  color: #0f172a;
  padding: 30px 36px;
  border-radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.wl-print-header {
  border-bottom: 2px solid #0f172a;
  padding-bottom: 14px;
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.wl-print-logo-wrap h1 {
  font-size: 1.3rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px 0;
  letter-spacing: 0.5px;
}

.wl-print-logo-wrap p {
  font-size: 0.8rem;
  color: #475569;
  margin: 0;
}

.wl-print-period-box {
  text-align: right;
  font-size: 0.8rem;
  color: #334155;
}

.wl-print-period-box strong {
  display: block;
  font-size: 0.92rem;
  color: #0f172a;
}

.wl-print-summary-box {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 20px;
  text-align: center;
}

.wl-print-summary-item span {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 600;
}

.wl-print-summary-item strong {
  font-size: 1.15rem;
  color: #0f172a;
}

.wl-print-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  margin-bottom: 24px;
}

.wl-print-table th,
.wl-print-table td {
  border: 1px solid #cbd5e1;
  padding: 8px 10px;
  vertical-align: top;
  text-align: left;
}

.wl-print-table th {
  background: #f1f5f9;
  font-weight: 700;
  color: #0f172a;
}

.wl-print-status-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
}

.wl-print-status-badge.completed { background: #dcfce7; color: #166534; }
.wl-print-status-badge.in_progress { background: #dbeafe; color: #1e40af; }
.wl-print-status-badge.pending { background: #fef3c7; color: #92400e; }

.wl-print-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.wl-print-photo-item {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  padding: 4px;
  background: #fafafa;
}

.wl-print-photo-item img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
  border-radius: 4px;
}

.wl-print-photo-caption {
  font-size: 0.72rem;
  color: #475569;
  padding: 4px 2px;
  line-height: 1.3;
}

/* Photo groups per work item */
.wl-print-photo-group {
  border-left: 3px solid #0284c7;
  padding: 10px 12px;
  margin-bottom: 20px;
  background: #f8fafc;
  border-radius: 0 6px 6px 0;
  page-break-inside: avoid;
}

.wl-print-photo-group-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
}

.wl-print-signatures {
  display: flex;
  justify-content: space-between;
  margin-top: 36px;
  padding-top: 14px;
  page-break-inside: avoid;
}

.wl-print-sign-col {
  width: 220px;
  text-align: center;
  font-size: 0.8rem;
  color: #334155;
}

.wl-print-sign-space {
  height: 60px;
}

.wl-print-sign-line {
  border-bottom: 1px solid #0f172a;
  margin-bottom: 4px;
}

/* 8. Settings Panel (Profil & TTD) */
.wl-settings-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.25s ease;
}

.wl-settings-panel.open {
  max-height: 600px;
  opacity: 1;
  pointer-events: auto;
}

.wl-settings-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(59, 130, 246, 0.05);
}

.wl-settings-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wl-settings-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.wl-settings-sig-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wl-sig-upload-area {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.wl-sig-preview-wrap {
  min-width: 120px;
}

.wl-sig-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wl-settings-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
}

/* ==========================================
   DETAIL MODAL VIEW STYLES
   ========================================== */
.wl-detail-modal-card {
  max-width: 840px;
}

.wl-detail-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.wl-detail-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.35;
  margin: 0 0 16px 0;
}

.wl-detail-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 18px;
}

.wl-detail-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wl-detail-info-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.wl-detail-info-value {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.wl-detail-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.wl-detail-section-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.wl-detail-desc-box {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

.wl-detail-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.wl-detail-photo-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.wl-detail-photo-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-focus);
}

.wl-detail-photo-img-wrap {
  width: 100%;
  height: 140px;
  overflow: hidden;
  background: #000;
  position: relative;
  cursor: pointer;
}

.wl-detail-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.wl-detail-photo-img-wrap:hover .wl-detail-photo-img {
  transform: scale(1.05);
}

.wl-detail-photo-caption-bar {
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-secondary);
  gap: 6px;
}

.wl-detail-photo-caption-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

/* ─── Modal Pratinjau Laporan & Toolbar Rentang Tanggal ──────────────────── */
.wl-report-modal-card {
  max-width: 1100px;
  width: 95%;
  max-height: 92vh;
}

.wl-report-modal-toolbar {
  padding: 10px 20px;
  background: var(--bg-card, #1e293b);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.wl-report-toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wl-report-toolbar-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}

.wl-report-date-range {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wl-report-date-input {
  max-width: 140px;
  background: var(--bg-primary, #0f172a);
  color: var(--text-primary, #f8fafc);
  border: 1px solid var(--border-color, #334155);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.82rem;
}

.wl-report-date-input:focus {
  border-color: var(--accent-color, #3b82f6);
  outline: none;
}

.wl-report-select {
  max-width: 220px;
  background: var(--bg-primary, #0f172a);
  color: var(--text-primary, #f8fafc);
  border: 1px solid var(--border-color, #334155);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.82rem;
}

.wl-report-select:focus {
  border-color: var(--accent-color, #3b82f6);
  outline: none;
}

.wl-report-loading-indicator {
  display: flex;
  align-items: center;
  margin-left: auto;
}

/* Media Query untuk Cetak Kertas / PDF */
@media print {
  body * {
    visibility: hidden;
  }
  #wl-report-print-container,
  #wl-report-print-container * {
    visibility: visible;
  }
  #wl-report-print-container {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 10mm;
    background: #ffffff !important;
    color: #000000 !important;
  }
  .wl-report-modal-toolbar,
  .wl-modal-header,
  .wl-modal-footer,
  .wl-modal-backdrop {
    display: none !important;
  }
  .wl-printable-report {
    padding: 0 !important;
  }
  .wl-print-photo-group {
    page-break-inside: avoid;
  }
}

