/* === GLOBAL FONTS & BASE STYLES === */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

body {
    font-family: 'Montserrat', sans-serif;
}

/* === GENERAL CONTAINERS === */
.cpd-log-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  padding: 20px;
  max-width: 100%;
  margin: auto;
}

.cpd-flex-layout {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* === ENTRY BOXES === */
.cpd-entry-box {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 15px;
    width: 100%;
    border-left: 4px solid #F5C85D;
    transition: transform 0.2s ease-in-out;
}

.cpd-entry-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.cpd-entry-title {
    font-size: 16px;
    font-weight: 700;
    color: #192A3D;
    margin-bottom: 8px;
}

.cpd-entry-details {
    font-size: 14px;
    color: #3A4F66;
    margin-bottom: 4px;
}

.cpd-entry-date {
    font-size: 12px;
    color: #888;
    margin-top: 8px;
}

.cpd-entry-certificate {
    margin-top: 8px;
    font-size: 12px;
}

.cpd-entry-certificate a {
    text-decoration: none;
    color: #0073AA;
    font-weight: bold;
}

/* === DASHBOARD + METRIC CARDS === */
.cpd-dashboard {
    background: #ffffff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.06);
    max-width: 1100px;
    margin: auto;
}

.cpd-header {
    font-size: 28px;
    font-weight: bold;
    color: #192a3d;
    margin-bottom: 25px;
    text-align: center;
}

.cpd-grid {
    display: flex;
    gap: 25px;
    justify-content: space-between;
    flex-wrap: wrap;
}

.cpd-card {
    background: #f5f7fa;
    border: 2px solid #3A4F66;
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    min-width: 250px;
}

.cpd-chart-container {
    text-align: center;
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* === FORM STYLING === */
.cpd-log-form {
  background: #ffffff;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.08);
  max-width: 800px;
  margin: 40px auto;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  color: #192a3d;
  margin-bottom: 6px;
  font-size: 15px;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
  background: #f9f9f9;
  color: #333;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #3A4F66;
  outline: none;
}

.form-full {
  grid-column: span 2;
}

.cpd-btn-submit {
  padding: 12px 20px;
  background-color: #192a3d;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.cpd-btn-submit:hover {
  background-color: #3A4F66;
}

/* === DOWNLOAD BUTTON === */
.cpd-btn-download {
  background: #192a3d;
  color: #fff;
  padding: 12px 24px;
  font-weight: bold;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.cpd-btn-download:hover {
  background: #3A4F66;
}

.cpd-download-wrapper {
  text-align: center;
  margin: 30px 0;
}

/* === ENTRY CARD STYLING === */
.cpd-log-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.cpd-log-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.2s ease;
}

.cpd-log-card:hover {
  transform: translateY(-2px);
}

.cpd-log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.cpd-log-header h3 {
  margin: 0;
  font-size: 18px;
  color: #192A3D;
}

.cpd-log-date {
  font-size: 14px;
  color: #888;
}

.cpd-log-body p {
  margin: 6px 0;
  font-size: 15px;
  color: #3A4F66;
}

.cpd-log-body a {
  font-weight: bold;
  color: #0073AA;
  text-decoration: none;
}

.cpd-log-footer {
  margin-top: 12px;
  text-align: right;
}

.cpd-log-footer button {
  background: #f44336;
  color: white;
  border: none;
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
}

.cpd-log-footer button:hover {
  background: #d32f2f;
}

.cpd-log-summary {
  margin-top: 30px;
  padding: 16px;
  background: #f5f5f5;
  border-left: 5px solid #F5C85D;
  border-radius: 10px;
  font-weight: 600;
  font-size: 16px;
  color: #192a3d;
}

/* === FILTER FORM === */
.cpd-filter-sort-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
}

.cpd-filter-sort-form label {
  font-weight: 600;
  cursor: default;
}

select {
  cursor: pointer;
}

/* === MESSAGES === */
.cpd-error-message {
  color: #b00;
  margin-bottom: 10px;
  font-weight: bold;
}

.cpd-success-message {
  color: #080;
  margin-bottom: 10px;
  font-weight: bold;
}

/* === RESPONSIVE: TABLET & MOBILE === */
@media (max-width: 1024px) {
  .cpd-log-container {
    flex-direction: column;
    padding: 15px;
  }

  .cpd-entry-box {
    width: 100% !important;
    margin-bottom: 20px;
  }
}

@media (max-width: 768px) {
  .cpd-grid {
    flex-direction: column;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-full {
    grid-column: span 1;
  }

  .cpd-filter-sort-form {
    flex-direction: column;
    align-items: flex-start;
  }
}



/* === DOWNLOAD FORM (PDF REPORT) === */
.cpd-download-form-wrapper {
  margin: 20px auto;
  max-width: 400px;
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.cpd-download-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.cpd-download-instructions {
  font-size: 14px;
  color: #3A4F66;
  font-weight: 600;
}

@media (max-width: 600px) {
  .form-grid {
    display: block !important;
  }

  .form-group,
  .form-group.form-full {
    width: 100% !important;
    margin-bottom: 15px;
  }

  .cpd-log-form-wrapper {
    padding: 10px !important;
    max-width: 100%;
  }

  .cpd-log-card {
    margin-bottom: 20px;
  }

  .cpd-log-header,
  .cpd-log-body,
  .cpd-log-footer {
    display: block;
    width: 100%;
  }

  .cpd-log-form input,
  .cpd-log-form select,
  .cpd-log-form textarea,
  .cpd-btn-submit {
    width: 100% !important;
    box-sizing: border-box;
  }

  .cpd-dashboard,
  .cpd-flex-layout,
  .cpd-log-form-wrapper,
  .cpd-log-card-wrapper {
    padding: 0 5px !important;
  }

  .cpd-section-title {
    font-size: 1.2em;
  }

  .cpd-entry-title {
    font-size: 14px;
  }

  .cpd-entry-details,
  .cpd-entry-date {
    font-size: 12px;
  }

  .cpd-log-container {
    padding: 10px;
  }

  /* Merged in the PDF Download Form styles */
  .cpd-download-form-wrapper {
    padding: 15px;
    max-width: 100%;
  }
}