/*
 * SCN Student Portal Management System — Front-end & Admin Styles
 * @package SCNSPMS
 */

/* ── Reset / Base ──────────────────────────────────────────────────────────── */
.scnspms-wrap *,
.scnspms-wrap *::before,
.scnspms-wrap *::after {
  box-sizing: border-box;
}

.scnspms-wrap {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: #333;
  line-height: 1.6;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

/* ── Notices ───────────────────────────────────────────────────────────────── */
.scnspms-notice {
  padding: 14px 18px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 0.97rem;
}
.scnspms-notice--info    { background: #e8f4fd; border-left: 4px solid #2196f3; color: #0d47a1; }
.scnspms-notice--success { background: #e8f5e9; border-left: 4px solid #4caf50; color: #1b5e20; }
.scnspms-notice--warning { background: #fff8e1; border-left: 4px solid #ffc107; color: #6d4c00; }
.scnspms-notice--error   { background: #fce4ec; border-left: 4px solid #f44336; color: #b71c1c; }

/* ── Card ──────────────────────────────────────────────────────────────────── */
.scnspms-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.scnspms-card__title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
  color: #1a237e;
}

/* ── Forms ──────────────────────────────────────────────────────────────────── */
.scnspms-form {
  width: 100%;
}

.scnspms-form__group {
  margin-bottom: 18px;
}

.scnspms-form__label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #444;
}

.scnspms-form__label .required {
  color: #e53935;
  margin-left: 2px;
}

.scnspms-form__input,
.scnspms-form__select,
.scnspms-form__textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 0.95rem;
  transition: border-color .2s, box-shadow .2s;
  background: #fff;
  color: #333;
}

.scnspms-form__input:focus,
.scnspms-form__select:focus,
.scnspms-form__textarea:focus {
  outline: none;
  border-color: #1a6699;
  box-shadow: 0 0 0 3px rgba(26,102,153,.15);
}

.scnspms-form__input.is-invalid,
.scnspms-form__select.is-invalid {
  border-color: #f44336;
}

.scnspms-form__error {
  color: #f44336;
  font-size: 0.83rem;
  margin-top: 4px;
  display: none;
}
.scnspms-form__error.visible { display: block; }

.scnspms-form__textarea { min-height: 100px; resize: vertical; }

.scnspms-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 640px) {
  .scnspms-form__row { grid-template-columns: 1fr; }
}

.scnspms-form__hint {
  font-size: 0.82rem;
  color: #888;
  margin-top: 4px;
}

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.scnspms-btn {
  display: inline-block;
  padding: 11px 28px;
  border: none;
  border-radius: 5px;
  font-size: 0.97rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, transform .1s;
}

.scnspms-btn--primary {
  background: #1a6699;
  color: #fff;
}
.scnspms-btn--primary:hover { background: #155480; }

.scnspms-btn--secondary {
  background: #f5f5f5;
  color: #333;
  border: 1px solid #ccc;
}
.scnspms-btn--secondary:hover { background: #ececec; }

.scnspms-btn--danger {
  background: #d32f2f;
  color: #fff;
}
.scnspms-btn--danger:hover { background: #b71c1c; }

.scnspms-btn--success {
  background: #388e3c;
  color: #fff;
}
.scnspms-btn--success:hover { background: #2e7d32; }

.scnspms-btn:disabled,
.scnspms-btn.loading {
  opacity: .6;
  cursor: not-allowed;
}

.scnspms-btn--full { width: 100%; text-align: center; }

/* ── Auth Pages (Sign-up / Sign-in) ─────────────────────────────────────────── */
.scnspms-auth {
  max-width: 480px;
  margin: 40px auto;
}

.scnspms-auth__logo {
  text-align: center;
  margin-bottom: 24px;
}

.scnspms-auth__logo img {
  max-height: 70px;
}

.scnspms-auth__title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
  color: #1a237e;
}

.scnspms-auth__link {
  text-align: center;
  margin-top: 16px;
  font-size: 0.9rem;
  color: #666;
}

.scnspms-auth__link a { color: #1a6699; }

/* ── Dashboard ──────────────────────────────────────────────────────────────── */
.scnspms-dashboard {
  padding: 0;
}

.scnspms-dashboard__header {
  background: linear-gradient(135deg, #1a237e 0%, #1a6699 100%);
  color: #fff;
  padding: 24px 32px;
  border-radius: 8px 8px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.scnspms-dashboard__header h2 {
  margin: 0;
  font-size: 1.3rem;
}

.scnspms-dashboard__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

/* Profile Widget */
.scnspms-profile__item {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 0.92rem;
}
.scnspms-profile__item:last-child { border-bottom: none; }
.scnspms-profile__label { color: #888; min-width: 120px; }
.scnspms-profile__value { font-weight: 500; }

/* Status badge */
.scnspms-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: capitalize;
}
.scnspms-badge--approved { background: #e8f5e9; color: #2e7d32; }
.scnspms-badge--pending  { background: #fff8e1; color: #f57f17; }
.scnspms-badge--rejected { background: #fce4ec; color: #c62828; }
.scnspms-badge--unpaid   { background: #fff3e0; color: #e65100; }
.scnspms-badge--paid     { background: #e8f5e9; color: #2e7d32; }

/* Voucher Table */
.scnspms-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.scnspms-table th {
  background: #f5f7fa;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  color: #555;
  border-bottom: 2px solid #e0e0e0;
}
.scnspms-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}
.scnspms-table tr:hover td { background: #fafafa; }

/* Notifications */
.scnspms-notif-list { list-style: none; padding: 0; margin: 0; }
.scnspms-notif-item {
  padding: 12px 14px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  transition: background .15s;
}
.scnspms-notif-item:hover { background: #f9f9f9; }
.scnspms-notif-item.unread { background: #f0f7ff; font-weight: 500; }
.scnspms-notif-item__subject { font-weight: 600; font-size: .92rem; }
.scnspms-notif-item__time { font-size: .78rem; color: #999; margin-top: 2px; }
.scnspms-notif-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #e53935;
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  margin-left: 6px;
}

/* File Upload Area */
.scnspms-upload-area {
  border: 2px dashed #c5cae9;
  border-radius: 6px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.scnspms-upload-area:hover,
.scnspms-upload-area.drag-over {
  border-color: #1a6699;
  background: #f0f7ff;
}
.scnspms-upload-area input[type="file"] { display: none; }
.scnspms-upload-area__icon { font-size: 2rem; color: #9fa8da; margin-bottom: 8px; }
.scnspms-upload-area__text { font-size: .88rem; color: #777; }

/* Pagination */
.scnspms-pagination { margin-top: 16px; text-align: center; }
.scnspms-pagination a {
  display: inline-block;
  padding: 6px 12px;
  margin: 0 2px;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #1a6699;
  text-decoration: none;
  font-size: .88rem;
}
.scnspms-pagination a.current {
  background: #1a6699;
  color: #fff;
  border-color: #1a6699;
}

/* Spinner */
.scnspms-spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 3px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: scnspms-spin .7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes scnspms-spin { to { transform: rotate(360deg); } }

/* Admin settings */
.scnspms-settings .nav-tab-wrapper { margin-bottom: 20px; }
.scnspms-settings .form-table th { width: 220px; }
#scnspms-rotate-key { margin-top: 8px; }
