/* ============================
   Dashboard Main Styles
============================ */
.dashboardContainer {
  padding: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.dashboardHeaderWithEdit {
  display: flex;
  flex-direction: column;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #E5E7EB;
}

.dashboardHeaderText {
  width: 100%;
  text-align: center;
}

.dashboardHeader {
  font-size: 32px;
  font-weight: 700;
  color: #1F2937;
  margin: 0 0 12px 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.paragraf {
  font-size: 16px;
  color: #6B7280;
  margin: 0;
  line-height: 1.5;
  font-weight: 400;
  max-width: 600px;
  margin: 0 auto;
}

/* Edit button akan ditempatkan di bawah grid */
.editButton {
  background-color: #F8FAFC;
  color: #475569;
  padding: 12px 24px;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 100px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  align-self: center;
  margin-top: 20px;
}

.editButton:hover {
  background-color: #F1F5F9;
  border-color: #CBD5E1;
  color: #334155;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.editButton:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* FIXED: Grid dengan spacing yang lebih rapi */
.dashboardGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
  padding: 0;
}

/* FIXED: Card dengan design yang lebih premium */
.dashboardCard {
  background-color: white;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 160px;
  width: 100%;
  position: relative;
  box-sizing: border-box;
}

.dashboardCard:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: #C7D2FE;
}

.dashboardCard:active {
  transform: translateY(-1px);
}

/* FIXED: Icon container dengan design yang lebih modern */
.dashboardIconContainer {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Updated colors dengan gradient subtle */
.dashboardIconBlue {
  background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
  color: #1E40AF;
}

.dashboardIconYellow {
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
  color: #D97706;
}

.dashboardIconGreen {
  background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
  color: #059669;
}

.dashboardIconPurple {
  background: linear-gradient(135deg, #EDE9FE 0%, #DDD6FE 100%);
  color: #7C3AED;
}

.dashboardIconAdd {
  background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
  color: #6B7280;
  border: 2px dashed #D1D5DB;
  box-shadow: none;
}

.dashboardIconAdd:hover {
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  border-color: #3B82F6;
  color: #1D4ED8;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

/* FIXED: Text dengan typography yang lebih baik */
.dashboardCardText {
  text-align: center;
  width: 100%;
  overflow: hidden;
}

.dashboardCardTitle {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 6px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  letter-spacing: -0.02em;
}

.dashboardCardSubtitle {
  font-size: 12px;
  color: #9CA3AF;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Document Card Wrapper untuk Edit Mode - Design yang lebih clean */
.documentCardWrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
}

.deleteIcon {
  position: absolute;
  top: -10px;
  right: -10px;
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  color: white;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
  z-index: 10;
  transition: all 0.2s ease;
  font-weight: 600;
}

.deleteIcon:hover {
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

/* Loading Spinner - FIXED untuk mengikuti ukuran card */
.spinnerContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
}

.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #007bff;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ============================
   Modal Styles
============================ */
.modalOverlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal {
  background-color: white;
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  max-height: 85vh;
  overflow-y: auto;
}

.modalHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 0 20px;
  border-bottom: 1px solid #e9ecef;
  margin-bottom: 20px;
}

.modalTitle {
  margin: 0;
  font-size: 18px;
  font-weight: bold;
  color: #333;
}

.modalCloseButton {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: gray;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.modalCloseButton:hover {
  color: #333;
}

.modalContent {
  padding: 0 20px 20px 20px;
}

.modalSection {
  margin-bottom: 25px;
}

.sectionLabel {
  display: block;
  margin-bottom: 15px;
  font-weight: bold;
  color: #333;
  font-size: 16px;
}

.modalLabel {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #333;
  font-size: 14px;
}

.modalInput {
  width: 100%;
  padding: 12px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.modalInput:focus {
  border-color: #007bff;
}

.templateGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
}

.templateCard {
  background-color: #f8f9fa;
  border-radius: 12px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.templateCard:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.templateCardActive {
  border-color: #007bff;
  background-color: #e3f2fd;
}

.customTemplateCard {
  background-color: #fff3cd;
}

.customTemplateActive {
  border-color: #ffc107;
  background-color: #fff3cd;
}

.templateContent {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.templateIconContainer {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #e0f7fa;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.2s ease;
}

.templateIconActive {
  background-color: #007bff;
  color: white;
}

.customIconActive {
  background-color: #ffc107;
  color: white;
}

.templateName {
  font-size: 12px;
  font-weight: bold;
  color: #333;
  text-align: center;
}

.modalFooter {
  display: flex;
  gap: 10px;
  padding: 20px;
  border-top: 1px solid #e9ecef;
}

.cancelButton {
  flex: 1;
  padding: 12px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  background-color: white;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  color: #666;
  transition: all 0.2s ease;
}

.cancelButton:hover {
  border-color: #007bff;
  color: #007bff;
}

.submitButton {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background-color: #007bff;
  color: white;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.2s ease;
}

.submitButton:hover:not(:disabled) {
  background-color: #0056b3;
}

.submitButton:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}

/* ============================
   Expectation Form Styles
============================ */
.expectationFormContainer {
  margin-top: 10px;
}

.fieldRow {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  gap: 8px;
}

.fieldInput {
  flex: 2;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s ease;
}

.fieldInput:focus {
  border-color: #007bff;
}

.fieldSelect {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  background-color: white;
  cursor: pointer;
}

.fieldSelect:focus {
  border-color: #007bff;
}

.removeFieldButton {
  background-color: #dc3545;
  color: white;
  border: none;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.2s ease;
}

.removeFieldButton:hover {
  background-color: #c82333;
}

.addFieldButton {
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 15px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
  transition: background-color 0.2s ease;
}

.addFieldButton:hover {
  background-color: #0056b3;
}

/* ============================
   Legacy Selection Styles (for backward compatibility)
============================ */
.selectionContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 140px);
  padding: 20px;
  box-sizing: border-box;
}

.selectionContent {
  background-color: white;
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  width: 100%;
}

.selectionHeader {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.selectionTitle {
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #333;
}

.selectionSubtitle {
  font-size: 10px;
  color: #666;
  margin-bottom: 30px;
}

.documentGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 20px;
  justify-content: center;
}

.documentCard {
  background-color: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  border: 1px solid #e9ecef;
  transition: transform 0.2s, box-shadow 0.2s;
}

.documentCard:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.documentIconContainer {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #e0f7fa;
  display: flex;
  justify-content: center;
  align-items: center;
}

.documentIconContainerFilled {
  background-color: #f0f0f0;
}

.documentIcon {
  font-size: 30px;
}

.plusIcon {
  font-size: 40px;
  color: #43a0a7;
  font-weight: 200;
}

.documentLabel {
  font-size: 15px;
  font-weight: bold;
  color: #333;
  text-transform: capitalize;
}

.paragraf {
  font-size: 16px;
  color: #666;
  margin-bottom: 30px;
  line-height: 1.5;
}

/* ============================
   Responsive Design - UPDATED untuk design yang lebih rapi
============================ */
@media (max-width: 768px) {
  .dashboardContainer {
    padding: 16px;
  }

  .dashboardHeaderWithEdit {
    margin-bottom: 24px;
    padding-bottom: 16px;
  }

  .dashboardHeader {
    font-size: 26px;
  }

  .paragraf {
    font-size: 15px;
  }

  .dashboardGrid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .dashboardCard {
    height: 140px;
    padding: 20px;
  }
  
  .dashboardIconContainer {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }
  
  .dashboardCardTitle {
    font-size: 14px;
  }
  
  .dashboardCardSubtitle {
    font-size: 11px;
  }

  .editButton {
    padding: 10px 20px;
    font-size: 13px;
    min-width: 80px;
    margin-top: 16px;
  }

  .deleteIcon {
    width: 24px;
    height: 24px;
    font-size: 16px;
    top: -8px;
    right: -8px;
  }
}

@media (max-width: 480px) {
  .dashboardContainer {
    padding: 12px;
  }
  
  .dashboardHeader {
    font-size: 24px;
  }

  .paragraf {
    font-size: 14px;
  }
  
  .dashboardGrid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .dashboardCard {
    height: 130px;
    padding: 16px;
  }

  .dashboardIconContainer {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .dashboardCardTitle {
    font-size: 13px;
  }
  
  .dashboardCardSubtitle {
    font-size: 10px;
  }

  .editButton {
    padding: 8px 16px;
    font-size: 12px;
    min-width: 70px;
    margin-top: 12px;
  }

  .deleteIcon {
    width: 22px;
    height: 22px;
    font-size: 14px;
    top: -6px;
    right: -6px;
  }
}