/* ============================================================
   PAK EVALUATION PLUGIN — FRONTEND STYLES
   ============================================================ */

/* Upload Form */
.pe-upload-wrap { max-width: 760px; margin: 0 auto; }

.pe-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .pe-form-row { grid-template-columns: 1fr; } }

.pe-form-group { margin-bottom: 22px; }
.pe-form-group label { display: block; font-size: 14px; font-weight: 500; color: #0B1F3A; margin-bottom: 7px; }
.pe-form-group input,
.pe-form-group select,
.pe-form-group textarea {
  width: 100%; padding: 12px 15px; border: 1px solid #E2E8F0;
  border-radius: 8px; font-size: 15px; color: #0B1F3A;
  background: #fff; transition: border-color 0.2s, box-shadow 0.2s; outline: none;
  font-family: inherit;
}
.pe-form-group input:focus,
.pe-form-group select:focus,
.pe-form-group textarea:focus {
  border-color: #0E9F7E;
  box-shadow: 0 0 0 3px rgba(14,159,126,0.12);
}
.pe-required { color: #E53E3E; }
.pe-optional { color: #718096; font-weight: 400; font-size: 13px; }
.pe-hint { font-size: 12px; color: #718096; margin-top: 6px; }

/* Dropzone */
.pe-dropzone {
  border: 2px dashed #E2E8F0; border-radius: 12px; padding: 44px 28px;
  text-align: center; background: #F7F5F0; cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.pe-dropzone:hover { border-color: #0E9F7E; background: rgba(14,159,126,0.03); }
.pe-dropzone-icon {
  width: 56px; height: 56px; background: rgba(14,159,126,0.12);
  border-radius: 12px; display: flex; align-items: center;
  justify-content: center; margin: 0 auto 14px;
}
.pe-dropzone-icon svg { width: 26px; height: 26px; color: #0E9F7E; }
.pe-dropzone h3 { font-size: 15px; font-weight: 500; color: #0B1F3A; margin-bottom: 6px; }
.pe-dropzone h3 span { color: #0E9F7E; }
.pe-dropzone p { font-size: 13px; color: #718096; }
.pe-format-tags { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.pe-tag { background: #E2E8F0; color: #4A5568; padding: 3px 11px; border-radius: 20px; font-size: 12px; }

/* File info */
.pe-file-info { margin-top: 12px; padding: 12px 16px; background: #F0FDF4; border: 1px solid #BBF7D0; border-radius: 8px; font-size: 14px; color: #166534; }

/* Notices */
.pe-notice {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 18px; border-radius: 10px; margin-bottom: 18px;
  font-size: 14px; line-height: 1.6;
}
.pe-notice svg { flex-shrink: 0; margin-top: 1px; }
.pe-notice a { font-weight: 500; }
.pe-notice-info    { background: #EFF8FF; border: 1px solid #BEE3F8; color: #2C5282; }
.pe-notice-info a  { color: #2C5282; }
.pe-notice-warning { background: #FFF8E1; border: 1px solid #FFE082; color: #7A5F00; }
.pe-notice-warning a { color: #7A5F00; text-decoration: underline; }
.pe-notice-error   { background: #FFF5F5; border: 1px solid #FED7D7; color: #9B2C2C; }

/* Checkbox */
.pe-checkbox-group label { display: flex; align-items: center; gap: 10px; font-weight: 400; cursor: pointer; }
.pe-checkbox-group input { width: auto !important; }

/* Buttons */
.pe-btn {
  display: inline-block; padding: 13px 28px; border-radius: 8px;
  font-size: 15px; font-weight: 500; cursor: pointer; transition: all 0.2s;
  text-align: center; text-decoration: none; border: none; font-family: inherit;
}
.pe-btn-primary { background: #0E9F7E; color: #fff; }
.pe-btn-primary:hover { background: #12C49A; color: #fff; transform: translateY(-1px); }
.pe-btn-outline { background: transparent; color: #0B1F3A; border: 1.5px solid #E2E8F0; }
.pe-btn-outline:hover { border-color: #0E9F7E; color: #0E9F7E; }
.pe-btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 6px; }
#pe-submit-btn { width: 100%; font-size: 16px; padding: 15px; }
#pe-submit-btn:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }

/* Message */
.pe-message { padding: 14px 18px; border-radius: 10px; font-size: 14px; margin-top: 16px; }

/* ============================================================
   RESULT PAGE
   ============================================================ */
.pe-result-wrap { max-width: 800px; margin: 0 auto; }

.pe-result-header {
  background: #0B1F3A; border-radius: 14px; padding: 26px 30px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; margin-bottom: 24px;
}
.pe-result-header h2 { font-size: 20px; color: #fff; margin-bottom: 4px; }
.pe-result-header p  { font-size: 13px; color: rgba(255,255,255,0.5); margin: 0; }
.pe-score-big {
  display: flex; flex-direction: column; align-items: center;
  color: #fff; padding: 12px 24px; border-radius: 12px;
  font-size: 26px; font-weight: 700; line-height: 1;
}
.pe-score-big span { font-size: 14px; font-weight: 500; margin-top: 4px; opacity: 0.85; }

.pe-result-summary {
  background: #F7F5F0; border-radius: 10px; padding: 18px 22px;
  font-size: 15px; color: #4A5568; line-height: 1.75;
  margin-bottom: 24px; font-style: italic;
  border-left: 4px solid #0E9F7E;
}

.pe-result-section { margin-bottom: 28px; }
.pe-result-section h3 { font-size: 16px; font-weight: 600; color: #0B1F3A; margin-bottom: 14px; font-family: 'DM Sans', sans-serif; }
.pe-result-section p  { font-size: 15px; color: #4A5568; line-height: 1.75; }

/* Score bars */
.pe-bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.pe-bar-label { font-size: 13px; color: #718096; width: 90px; flex-shrink: 0; }
.pe-bar-wrap  { flex: 1; height: 8px; background: #E2E8F0; border-radius: 4px; overflow: hidden; }
.pe-bar-fill  { height: 100%; border-radius: 4px; transition: width 1s ease; }
.pe-bar-val   { font-size: 13px; font-weight: 600; color: #0B1F3A; width: 36px; text-align: right; }

/* Grid */
.pe-result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 28px; }
@media (max-width: 640px) { .pe-result-grid { grid-template-columns: 1fr; } }

.pe-strengths, .pe-weaknesses { background: #F7F5F0; border-radius: 12px; padding: 20px; }
.pe-strengths h3 { color: #0E9F7E; }
.pe-weaknesses h3 { color: #E53E3E; }
.pe-result-section ul li {
  font-size: 14px; color: #4A5568; padding: 6px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  line-height: 1.6;
}
.pe-result-section ul li:last-child { border-bottom: none; }

/* Grammar list */
.pe-grammar-list { background: #FFF8E1; border-radius: 10px; padding: 18px 20px; }
.pe-grammar-list li { font-size: 14px; color: #7A5F00; border-color: rgba(122,95,0,0.1) !important; }

/* Suggestions */
.pe-suggestion-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.pe-suggestion-tag { background: #F0FDF4; color: #166534; border: 1px solid #BBF7D0; padding: 7px 16px; border-radius: 20px; font-size: 13px; }

/* Encouragement */
.pe-result-encouragement {
  background: #0B1F3A; color: rgba(255,255,255,0.85);
  border-radius: 10px; padding: 18px 22px; font-size: 15px;
  display: flex; align-items: flex-start; gap: 12px;
  line-height: 1.65; margin-bottom: 28px;
}
.pe-result-encouragement svg { color: #F5A623; flex-shrink: 0; margin-top: 2px; }

/* Result actions */
.pe-result-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }

/* Pending state */
.pe-result-pending {
  text-align: center; padding: 60px 20px;
  background: #F7F5F0; border-radius: 14px;
}
.pe-result-pending h3 { font-size: 22px; margin-bottom: 10px; }
.pe-result-pending p  { font-size: 15px; color: #718096; }
.pe-spinner {
  width: 44px; height: 44px; border: 3px solid #E2E8F0;
  border-top-color: #0E9F7E; border-radius: 50%;
  animation: pe-spin 0.8s linear infinite;
  margin: 0 auto 20px;
}
@keyframes pe-spin { to { transform: rotate(360deg); } }

/* ============================================================
   DASHBOARD
   ============================================================ */
.pe-dashboard-wrap { max-width: 900px; margin: 0 auto; }

.pe-dashboard-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; margin-bottom: 28px;
}
.pe-dashboard-header h2 { font-size: 26px; }

.pe-submission-list { display: flex; flex-direction: column; gap: 14px; }

.pe-submission-row {
  background: #fff; border: 1px solid #E2E8F0; border-radius: 12px;
  padding: 20px 24px; display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 14px;
  transition: border-color 0.2s;
}
.pe-submission-row:hover { border-color: #0E9F7E; }
.pe-sub-info strong { display: block; font-size: 15px; color: #0B1F3A; margin-bottom: 4px; }
.pe-sub-info span   { font-size: 13px; color: #718096; }
.pe-sub-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.pe-score-badge { background: #0B1F3A; color: #fff; padding: 4px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; }

.pe-status-badge { padding: 4px 13px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.pe-status-pending    { background: #FFF8E1; color: #7A5F00; border: 1px solid #FFE082; }
.pe-status-processing { background: #EFF8FF; color: #2C5282; border: 1px solid #BEE3F8; }
.pe-status-evaluated  { background: #F0FDF4; color: #166534; border: 1px solid #BBF7D0; }
.pe-status-failed     { background: #FFF5F5; color: #9B2C2C; border: 1px solid #FED7D7; }

/* Empty state */
.pe-empty-state {
  text-align: center; padding: 70px 20px;
  background: #fff; border: 1px solid #E2E8F0;
  border-radius: 14px;
}
.pe-empty-state svg { color: #CBD5E0; margin: 0 auto 20px; }
.pe-empty-state h3  { font-size: 22px; margin-bottom: 10px; }
.pe-empty-state p   { font-size: 15px; color: #718096; margin-bottom: 28px; }
