/*
 * app.css — custom CSS for the Indomie Scholarship parent portal.
 * Layered on top of Tailwind CDN.
 */

:root {
  --brand: #fb1200;
  --brand-dark: #c50e00;
  --brand-soft: #fff0ef;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #fafafa;
  color: #1a1a1a;
  -webkit-font-smoothing: antialiased;
}

/* Brand buttons */
.btn-brand {
  background: var(--brand);
  color: #fff;
  padding: 0.625rem 1.5rem;
  font-weight: 600;
  border-radius: 6px;
  border: 0;
  display: inline-block;
  text-decoration: none;
  transition: background 0.15s;
  cursor: pointer;
}
.btn-brand:hover { background: var(--brand-dark); color: #fff; }
.btn-brand:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-outline {
  background: #fff;
  color: var(--brand);
  padding: 0.625rem 1.5rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--brand);
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
}
.btn-outline:hover { background: var(--brand-soft); }

.btn-secondary {
  background: #f0f0f0;
  color: #333;
  padding: 0.625rem 1.5rem;
  font-weight: 500;
  border-radius: 6px;
  border: 0;
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
}
.btn-secondary:hover { background: #e0e0e0; }

/* Brand bar (top of page) */
.brand-bar {
  background: var(--brand);
  color: #fff;
  padding: 0.6rem 0;
  font-size: 0.875rem;
  text-align: center;
}

/* Form inputs — Tailwind doesn't auto-style these without forms plugin */
.input, .select, .textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  font-size: 0.95rem;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(251, 18, 0, 0.12);
}

/* Status badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  text-transform: capitalize;
  letter-spacing: 0.02em;
}
.badge-draft { background: #e5e7eb; color: #4b5563; }
.badge-submitted { background: #dbeafe; color: #1e3a8a; }
.badge-under_review { background: #fef3c7; color: #92400e; }
.badge-approved { background: #d1fae5; color: #064e3b; }
.badge-rejected { background: #fee2e2; color: #7f1d1d; }
.badge-shortlisted { background: var(--brand); color: #fff; }

/* OTP input */
.otp-input {
  font-size: 1.5rem;
  text-align: center;
  letter-spacing: 0.5rem;
  font-weight: 600;
}

/* Alerts */
.alert {
  padding: 0.875rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}
.alert-success { background: #d1fae5; color: #064e3b; }
.alert-error { background: #fee2e2; color: #7f1d1d; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-info { background: #dbeafe; color: #1e3a8a; }

/* Card */
.card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border: 1px solid #ececec;
}

/* Term card with progress border */
.term-card {
  border-left: 4px solid #ddd;
  padding: 0.875rem 1rem;
  margin-bottom: 0.75rem;
  background: #fff;
  border-radius: 0 6px 6px 0;
}
.term-card.done { border-left-color: #10b981; }

/* Loading spinner (used during fetches) */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #ccc;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Campaign window banner */
.campaign-banner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  text-align: center;
  border-bottom: 1px solid transparent;
}
.campaign-banner-open    { background: #e7f5ff; color: #0a4a6e; border-color: #b3d9eb; }
.campaign-banner-soon    { background: #fff7e6; color: #6b4500; border-color: #f5d77a; }
.campaign-banner-closed  { background: #fce4e4; color: #6e1a1a; border-color: #f0a4a4; }
.campaign-banner strong  { font-weight: 600; }
