/* =============================================
   InternHub — styles.css
   Sections:
     1. CSS Variables (Design Tokens)
     2. Reset & Base
     3. Navigation
     4. Page / Layout
     5. Auth (Login, Register, Forgot)
     6. Forms & Inputs
     7. Buttons
     8. Application Form (Steps & Progress)
     9. File Upload
    10. Success Screen
    11. Tracking (Cards, Status Badges, Timeline)
    12. Utilities & Responsive
   ============================================= */


/* ─── 1. CSS Variables ─── */
:root {
  --brand:        #0057FF;
  --brand-dark:   #003DB3;
  --brand-light:  #EBF0FF;
  --brand-mid:    #4D89FF;
  --accent:       #FF5C2B;
  --bg:           #F4F6FB;
  --surface:      #FFFFFF;
  --surface2:     #F0F3FA;
  --text:         #0D1B3E;
  --text2:        #4A5578;
  --text3:        #8994B3;
  --border:       #D8DFEE;
  --border2:      #C0CBDF;
  --success:      #0E9E5C;
  --success-bg:   #E6F7F0;
  --warning:      #E07B00;
  --warning-bg:   #FFF4E0;
  --danger:       #D92B2B;
  --danger-bg:    #FDECEC;
  --radius:       12px;
  --radius-sm:    8px;
  --radius-lg:    20px;
  --shadow:       0 2px 16px rgba(0,40,120,0.08);
  --shadow-lg:    0 8px 40px rgba(0,40,120,0.14);
}


/* ─── 2. Reset & Base ─── */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: 'Syne', sans-serif;
}


/* ─── 3. Navigation ─── */
nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--brand);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo .dot { color: var(--accent); }

.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text2);
}

.nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Syne', sans-serif;
}

.btn-logout {
  font-size: 13px;
  color: var(--text3);
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-logout:hover {
  background: var(--bg);
  color: var(--text2);
}


/* ─── 4. Page / Layout ─── */
.page {
  display: none;
  animation: fadeIn 0.25s ease;
}
.page.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.app-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
}

.page-header { margin-bottom: 2rem; }
.page-header h1 { font-size: 26px; font-weight: 700; }
.page-header p  { color: var(--text2); margin-top: 4px; }


/* ─── 5. Auth (Login / Register / Forgot) ─── */
.auth-layout {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(135deg, #EBF0FF 0%, #F4F6FB 50%, #FFF0EB 100%);
}

.auth-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
  border: 1px solid var(--border);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-icon {
  width: 56px;
  height: 56px;
  background: var(--brand-light);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 26px;
}

.auth-header h2 { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.auth-header p  { font-size: 14px; color: var(--text2); }

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 13.5px;
  color: var(--text2);
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1.2rem 0;
  color: var(--text3);
  font-size: 12px;
}
.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--border);
}

.alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 1rem;
  display: none;
}
.alert.show          { display: flex; align-items: center; gap: 8px; }
.alert-danger        { background: var(--danger-bg);  color: var(--danger);  border: 1px solid #f5c6c6; }
.alert-success       { background: var(--success-bg); color: var(--success); border: 1px solid #a7dfc4; }

/* Register grid */
.reg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.reg-grid .span2 { grid-column: 1 / -1; }


/* ─── 6. Forms & Inputs ─── */
.form-group  { margin-bottom: 1.1rem; }

label.field-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  margin-bottom: 5px;
  font-family: 'Syne', sans-serif;
}

.required { color: var(--accent); }

input[type=text],
input[type=email],
input[type=password],
input[type=date],
select,
textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0,87,255,0.1);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238994B3' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

.input-icon-wrap { position: relative; }
.input-icon-wrap input { padding-right: 40px; }
.input-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--text3);
  font-size: 16px;
  user-select: none;
}

/* Password strength meter */
.strength-bar-wrap { margin-top: 6px; display: flex; gap: 4px; }
.strength-seg {
  height: 3px;
  flex: 1;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.2s;
}

/* Links */
.auth-footer a,
.link {
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}
.auth-footer a:hover,
.link:hover { text-decoration: underline; }


/* ─── 7. Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  font-family: 'Syne', sans-serif;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-decoration: none;
}

.btn-primary          { background: var(--brand);   color: white; width: 100%; }
.btn-primary:hover    { background: var(--brand-dark); }
.btn-primary:active   { transform: scale(0.98); }

.btn-secondary        { background: var(--surface2); color: var(--text2); border: 1px solid var(--border); }
.btn-secondary:hover  { background: var(--border); }

.btn-accent           { background: var(--accent); color: white; }
.btn-accent:hover     { background: #e0461a; }


/* ─── 8. Application Form (Steps & Progress) ─── */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 2rem;
  width: fit-content;
  border: 1px solid var(--border);
}

.tab-btn {
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Syne', sans-serif;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--text2);
  transition: all 0.15s;
}

.tab-btn.active {
  background: var(--surface);
  color: var(--brand);
  box-shadow: 0 1px 4px rgba(0,40,120,0.1);
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 2rem;
}

.form-section {
  margin-bottom: 1.8rem;
  padding-bottom: 1.8rem;
  border-bottom: 1px solid var(--border);
}
.form-section:last-child { border-bottom: none; margin-bottom: 0; }

.section-title {
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--brand-light);
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .span2 { grid-column: 1 / -1; }

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.btn-submit { min-width: 180px; }

/* Multi-step progress indicator */
.form-progress {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 2rem;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
}

.progress-step::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 100%;
  width: 40px;
  height: 2px;
  background: var(--border);
}
.progress-step:last-child::before { display: none; }
.progress-step.done::before { background: var(--brand); }

.ps-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Syne', sans-serif;
}
.progress-step.active .ps-num { background: var(--brand);   color: white; }
.progress-step.done   .ps-num { background: var(--success); color: white; font-size: 12px; }

.ps-label {
  font-size: 11px;
  color: var(--text3);
  font-family: 'Syne', sans-serif;
  font-weight: 500;
  white-space: nowrap;
}
.progress-step.active .ps-label { color: var(--brand); }
.progress-step.done   .ps-label { color: var(--success); }


/* ─── 9. File Upload ─── */
.file-upload {
  border: 1.5px dashed var(--border2);
  border-radius: var(--radius-sm);
  padding: 18px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}
.file-upload:hover {
  border-color: var(--brand);
  background: var(--brand-light);
}
.file-upload input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
}
.file-upload .file-icon  { font-size: 24px; margin-bottom: 6px; }
.file-upload .file-label { font-size: 13px; color: var(--text2); }
.file-upload .file-name  { font-size: 12px; color: var(--brand); margin-top: 4px; font-weight: 500; }


/* ─── 10. Success Screen ─── */
.success-screen {
  text-align: center;
  padding: 3rem 2rem;
}

.success-checkmark {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--success-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 1.5rem;
  border: 3px solid #a7dfc4;
}

.success-screen h2 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.success-screen p  { color: var(--text2); margin-bottom: 1.5rem; }

.app-id-display {
  background: var(--brand-light);
  border: 1px dashed var(--brand-mid);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  display: inline-block;
  font-family: monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--brand-dark);
  letter-spacing: 2px;
  margin-bottom: 1.5rem;
}


/* ─── 11. Tracking (Cards, Status Badges, Timeline) ─── */
.tracking-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text3);
}
.tracking-empty .empty-icon { font-size: 48px; margin-bottom: 1rem; }

.application-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s;
}
.application-card:hover { box-shadow: var(--shadow-lg); }

.app-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.app-title    { font-family: 'Syne', sans-serif; font-size: 17px; font-weight: 600; }
.app-subtitle { font-size: 13px; color: var(--text2); margin-top: 2px; }
.app-id {
  font-size: 11px;
  color: var(--text3);
  font-family: monospace;
  background: var(--surface2);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Syne', sans-serif;
}
.status-badge .dot { width: 6px; height: 6px; border-radius: 50%; }

.status-submitted   { background: var(--brand-light);  color: var(--brand-dark); }
.status-submitted   .dot { background: var(--brand); }

.status-review      { background: var(--warning-bg);   color: var(--warning); }
.status-review      .dot { background: var(--warning); }

.status-shortlisted { background: #EDF6FF; color: #1565c0; }
.status-shortlisted .dot { background: #1565c0; }

.status-accepted    { background: var(--success-bg);   color: var(--success); }
.status-accepted    .dot { background: var(--success); }

.status-rejected    { background: var(--danger-bg);    color: var(--danger); }
.status-rejected    .dot { background: var(--danger); }

/* Application timeline */
.timeline {
  display: flex;
  gap: 0;
  margin: 1rem 0 0;
  position: relative;
}

.timeline-step {
  flex: 1;
  position: relative;
  text-align: center;
}

.timeline-step::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  right: -50%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.timeline-step:last-child::before { display: none; }
.timeline-step.done::before { background: var(--brand); }

.ts-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  margin: 0 auto 6px;
  position: relative;
  z-index: 1;
  font-weight: 600;
  border: 2px solid var(--border);
}
.timeline-step.done    .ts-circle { background: var(--brand);   color: white; border-color: var(--brand); }
.timeline-step.current .ts-circle { background: var(--surface); color: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,87,255,0.15); }

.ts-label {
  font-size: 10px;
  color: var(--text3);
  font-weight: 500;
  font-family: 'Syne', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.timeline-step.done    .ts-label,
.timeline-step.current .ts-label { color: var(--brand-dark); }

.app-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text3);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.app-meta span { display: flex; align-items: center; gap: 4px; }


/* ─── 12. Utilities & Responsive ─── */
@media (max-width: 700px) {
  .form-progress { gap: 20px; }
  .progress-step::before { width: 20px; }
  .app-layout { padding: 1rem; }
  .auth-card  { padding: 1.6rem; }
}

@media (max-width: 600px) {
  .form-grid  { grid-template-columns: 1fr; }
}

@media (max-width: 440px) {
  .reg-grid { grid-template-columns: 1fr; }
}
