/* ==========================================
   DASHBOARD - MODERN MINIMALIST
   ========================================== */

.dash-container {
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: 100%;
  max-width: 1440px;
  min-width: 0;
  margin: 0 auto;
  padding-bottom: 24px;
  animation: dashFadeIn 0.35s ease;
}

.app-content:has(.dash-container) {
  overflow-x: hidden;
}

@keyframes dashFadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.text-center {
    font-size: 12px;
  }

/* ==========================================
   WELCOME
   ========================================== */

.dash-welcome {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
  padding: 30px 32px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(120deg, #12313d 0%, #2e1763 58%, #236284 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(18, 61, 50, 0.12);
}

.dash-welcome::after {
  content: "";
  position: absolute;
  top: -90px;
  right: 12%;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  box-shadow:
    0 0 0 35px rgba(255, 255, 255, 0.025),
    0 0 0 70px rgba(255, 255, 255, 0.02);
  pointer-events: none;
}

.dash-welcome-content {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.dash-eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: #b7e4cb;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.8px;
}

.dash-welcome h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.7px;
}

.dash-welcome p {
  margin: 9px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  line-height: 1.6;
}

.dash-welcome-date {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  padding: 11px 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.dash-welcome-date svg {
  width: 17px;
  height: 17px;
  color: #b7e4cb;
}

/* ==========================================
   SECTION HEADINGS
   ========================================== */

.dash-section-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.dash-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.dash-section-heading > div {
  flex: 1;
  min-width: 0;
}

.dash-section-heading h3 {
  margin: 0;
  color: var(--text-main, #1e293b);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.45px;
}

.dash-section-heading p {
  margin: 4px 0 0;
  color: var(--text-muted, #64748b);
  font-size: 12px;
  line-height: 1.5;
}

.dash-section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 8px 10px;
  color: var(--primary-color, #2563eb);
  background: var(--bg-card, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.dash-section-link:hover {
  background: var(--bg-hover, #f8fafc);
  border-color: #94a3b8;
}

.dash-section-link svg {
  width: 14px;
  height: 14px;
}

.dash-section-heading > div {
  position: relative;
  padding-left: 12px;
}

.dash-section-heading > div::before {
  content: "";
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: 3px;
  border-radius: 99px;
  background: var(--primary-color, #2563eb);
}

/* ==========================================
   ATTENDANCE / KEHADIRAN
   ========================================== */

.dash-attendance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.dash-attendance-card {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
  padding: 20px;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 15px;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.025);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.dash-attendance-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.dash-attendance-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 13px;
}

.dash-attendance-icon svg {
  width: 22px;
  height: 22px;
}

.dash-attendance-present {
  color: #15803d;
  background: #dcfce7;
}

.dash-attendance-pending {
  color: #b45309;
  background: #fef3c7;
}

.dash-attendance-absent {
  color: #dc2626;
  background: #fee2e2;
}

.dash-attendance-card > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.dash-attendance-card span {
  color: var(--text-muted, #64748b);
  font-size: 12px;
  font-weight: 500;
}

.dash-attendance-card strong {
  color: var(--text-main, #1e293b);
  font-size: 25px;
  font-weight: 700;
  line-height: 1.15;
}
/* ==========================================
   PLANNING
   ========================================== */
/*====================
Blok 1 — Planning Dashboard Desktop: mengatur card utama agenda dengan tata letak yang lapang.
======================*/
.dash-planning-card {
  display: flex;

  align-items: flex-start;
  gap: 18px;
  min-width: 0;
  padding: 24px;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 16px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}

.dash-planning-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  color: #2563eb;
  background: #eff6ff;
  border-radius: 13px;
}

.dash-planning-icon svg {
  width: 23px;
  height: 23px;
}

.dash-planning-content {
  flex: 1;
  min-width: 0;
}

.dash-planning-content > strong {
  display: block;
  margin-bottom: 16px;
  color: var(--text-main, #1e293b);
  font-size: 15px;
  font-weight: 700;
}

.dash-planning-content > p {
  margin: 0;
  color: var(--text-muted, #64748b);
  font-size: 13px;
  line-height: 1.6;
}

/*====================
Blok 2 — Item Agenda Dashboard Desktop: membedakan judul kegiatan, label divisi, dan waktu.
======================*/
.dash-agenda-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  margin-top: 12px;
  padding: 16px 18px;
  background: var(--bg-body, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.dash-agenda-item:first-child {
  margin-top: 0;
}

.dash-agenda-item > strong {
  color: var(--text-main, #1e293b);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.dash-agenda-division {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 6px 10px;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.dash-agenda-division svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.dash-agenda-item > small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted, #64748b);
  font-size: 12px;
  line-height: 1.5;
}

.dash-agenda-item > small::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background: currentColor;
  opacity: 0.8;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

@media (hover: hover) {
  .dash-agenda-item:hover {
    border-color: #bfdbfe;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.06);
  }
}

/*====================
Blok 3 — Badge Planning Desktop: menampilkan penanda agenda pada sisi kanan card utama.
======================*/
.dash-planning-badge {
  flex-shrink: 0;
  padding: 6px 10px;
  color: #1d4ed8;
  background: #eff6ff;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
}

/*====================
Blok 4 — Grid Agenda Dashboard Desktop: menyusun kartu agenda dalam dua kolom.
======================*/
.dash-planning-agenda-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.dash-planning-agenda-list > p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--text-muted, #64748b);
  font-size: 13px;
  line-height: 1.6;
}

.dash-planning-agenda-list .dash-agenda-item {
  min-width: 0;
  margin-top: 0;
}

/* ==========================================
   INVENTORY SUMMARY
   ========================================== */

.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}
.dash-stat-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  min-height: 104px;
  padding: 18px;
  overflow: hidden;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 15px;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.025);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}
.dash-stat-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}
.dash-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
}
.dash-stat-icon svg {
  width: 21px;
  height: 21px;
}
.dash-stat-info {
  min-width: 0;
}
.dash-stat-label {
  display: block;
  line-height: 1.4;
  overflow-wrap: break-word;
}
.dash-stat-value {
  margin-top: 5px;
  overflow-wrap: anywhere;
}
.dash-stat-hint {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.4;
}

.dash-bg-primary {
  color: #2563eb;
  background: #eff6ff;
}

.dash-bg-success {
  color: #059669;
  background: #d1fae5;
}

.dash-bg-warning {
  color: #b45309;
  background: #fef3c7;
}

.dash-bg-danger {
  color: #dc2626;
  background: #fee2e2;
}

.dash-stat-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.dash-stat-label {
  color: var(--text-muted, #64748b);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.dash-stat-value {
  margin: 0;
  color: var(--text-main, #1e293b);
  font-size: 25px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.5px;
  overflow-wrap: anywhere;
}

/* ==========================================
   RECENT ACTIVITY
   ========================================== */

.dash-activity-section {
  min-width: 0;
}

.dash-activity-card {
  min-width: 0;
  overflow: hidden;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 15px;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.025);
}

.dash-activity-card .table-container {
  width: 100%;
  margin: 0;
  overflow-x: auto;
  border: 0;
  border-radius: 0;
}

.dash-activity-card .data-table {
  width: 100%;
  margin: 0;
}

.dash-activity-card .data-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-card, #ffffff);
}

.dash-activity-card .data-table th {
  padding: 14px 16px;
  color: var(--text-muted, #64748b);
  background: var(--bg-hover, #f8fafc);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.35px;
  text-transform: uppercase;
  white-space: nowrap;
}

.dash-activity-card .data-table td {
  padding: 14px 16px;
  font-size: 13px;
  vertical-align: middle;
}

.dash-activity-card .data-table tbody tr:last-child td {
  border-bottom: 0;
}

.dash-stat-clickable {
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.dash-stat-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}
.dash-stat-clickable:focus-visible {
  outline: 2px solid var(--primary-500, #267cee);
  outline-offset: 3px;
}
.dash-stat-hint {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}
.dashboard-detail-dialog {
  max-width: 760px;
}
.dashboard-detail-loading {
  margin: 0;
  color: #64748b;
}
.dashboard-detail-count {
  margin: 0 0 14px;
  color: #64748b;
  font-size: 13px;
}
.dashboard-detail-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dashboard-detail-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}
.dashboard-detail-name {
  font-weight: 600;
  color: #1e293b;
}
.dashboard-detail-meta {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}
.dashboard-detail-value {
  flex-shrink: 0;
  font-weight: 600;
  text-align: right;
}
.dashboard-detail-empty {
  padding: 24px 12px;
  color: #64748b;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .dash-container,
  .dash-stat-card,
  .dash-attendance-card,
  .dash-section-link {
    animation: none;
    transition: none;
  }
}

/* Attendance Request Cards */
.attendance-notification-dialog {
  width: min(560px, calc(100% - 32px));
  max-height: 85vh;
  overflow-y: auto;
}

.attendance-request-card {
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 14px;
  background: var(--card-bg, #ffffff);
}

.attendance-request-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.attendance-request-heading strong {
  color: var(--text-color, #1e293b);
  font-size: 14px;
}

.attendance-request-status {
  padding: 5px 9px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.attendance-request-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.attendance-request-details p,
.attendance-request-reason p {
  margin: 0;
}

.attendance-request-details p span,
.attendance-request-reason > span {
  display: block;
  margin-bottom: 5px;
  color: var(--text-muted, #64748b);
  font-size: 11px;
}

.attendance-request-details p strong {
  color: var(--text-color, #334155);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.attendance-request-reason {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color, #e2e8f0);
}

.attendance-request-reason p {
  color: var(--text-color, #334155);
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
