/* Student portal — professional layer (extends app.css) */
.student-portal {
  --stu-accent: #0d9488;
  --stu-accent-soft: rgba(13, 148, 136, 0.12);
  --stu-sidebar-from: #0b1220;
  --stu-sidebar-to: #111a2e;
  --stu-surface-elevated: #ffffff;
  --stu-text-soft: #64748b;
}

.student-portal .dashboard-wrap {
  background: linear-gradient(180deg, #f1f5f9 0%, #e8eef5 100%);
  min-height: 100vh;
}

/* Sidebar */
.student-portal .sidebar.student-sidebar {
  background: linear-gradient(180deg, var(--stu-sidebar-from) 0%, var(--stu-sidebar-to) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 4px 0 24px rgba(15, 23, 42, 0.12);
}

.student-portal .student-sidebar .sidebar-brand {
  padding: 1.35rem 1.15rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.student-portal .student-sidebar .sidebar-brand a {
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  gap: 0.75rem;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
}

.student-portal .student-sidebar .sidebar-brand a > span:last-of-type:not(.logo-icon) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.25;
}

.student-portal .student-sidebar .logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--stu-accent) 0%, #0f766e 100%);
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
}

.student-portal .student-sidebar .brand-sub {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sidebar-muted);
  margin-top: 0.2rem;
}

.student-portal .student-sidebar .sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.62rem 0.9rem;
  border-radius: 10px;
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
}

.student-portal .student-sidebar .sidebar-nav a .nav-ico {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.75;
}

.student-portal .student-sidebar .sidebar-nav a:hover .nav-ico,
.student-portal .student-sidebar .sidebar-nav a.active .nav-ico {
  opacity: 1;
}

.student-portal .student-sidebar .sidebar-nav a.active {
  background: linear-gradient(90deg, rgba(13, 148, 136, 0.25) 0%, rgba(13, 148, 136, 0.08) 100%);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--stu-accent);
}

.student-portal .student-sidebar .sidebar-footer {
  font-size: 0.72rem;
  opacity: 0.65;
}

/* Top bar */
.student-topbar {
  background: var(--stu-surface-elevated);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.student-topbar-title-wrap {
  min-width: 0;
}

.student-topbar-title-wrap h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
  line-height: 1.25;
}

.student-page-subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: var(--stu-text-soft);
  font-weight: 400;
  max-width: 42rem;
}

.student-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.student-user-chip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.65rem 0.35rem 0.35rem;
  background: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  max-width: 100%;
}

.student-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--stu-accent), #0f766e);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.student-user-meta {
  min-width: 0;
  text-align: left;
}

.student-user-meta .name {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.student-user-meta .email {
  display: block;
  font-size: 0.72rem;
  color: var(--stu-text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.student-content {
  padding: 1.5rem;
  max-width: 1120px;
}

.student-portal .main-area {
  background: transparent;
}

/* Dashboard */
.student-welcome {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 55%, #134e4a 100%);
  color: #fff;
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.2);
}

.student-welcome::after {
  content: "";
  position: absolute;
  right: -20%;
  top: -40%;
  width: 55%;
  height: 180%;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.35) 0%, transparent 70%);
  pointer-events: none;
}

.student-welcome-inner {
  position: relative;
  z-index: 1;
}

.student-welcome h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.student-welcome p {
  margin: 0;
  opacity: 0.88;
  font-size: 0.95rem;
  max-width: 36rem;
}

.student-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.student-stat-card {
  background: var(--stu-surface-elevated);
  border-radius: 12px;
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: transform 0.15s, box-shadow 0.15s;
}

.student-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.student-stat-card .stu-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--stu-text-soft);
}

.student-stat-card .stu-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.student-stat-card .stu-hint {
  font-size: 0.78rem;
  color: var(--stu-text-soft);
}

.student-stat-card--accent .stu-value {
  color: var(--stu-accent);
}

/* Section cards */
.student-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.student-section-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.student-card {
  background: var(--stu-surface-elevated);
  border-radius: 12px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow);
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.25rem;
}

.student-card--flat {
  box-shadow: none;
  background: #f8fafc;
}

.student-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--stu-text-soft);
  margin: 0 0 1rem;
}

/* Job list */
.student-job-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.student-job-card {
  background: var(--stu-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.25rem 1.35rem;
  border-left: 4px solid var(--stu-accent);
  display: grid;
  gap: 0.65rem;
  transition: box-shadow 0.15s;
}

.student-job-card:hover {
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.07);
}

.student-job-card h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.student-job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--stu-text-soft);
}

.student-job-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.student-job-meta strong {
  color: #334155;
  font-weight: 600;
}

.student-job-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

/* Filters */
.student-filters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem 1.25rem;
  align-items: end;
}

.student-filters .form-group {
  margin-bottom: 0;
}

.student-filters .filter-actions {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
  grid-column: 1 / -1;
}

.student-checkbox-row {
  grid-column: 1 / -1;
}

.student-checkbox-row label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
  color: #334155;
}

/* Job detail */
.student-job-hero {
  background: var(--stu-surface-elevated);
  border-radius: 14px;
  border: 1px solid var(--color-border);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
}

.student-job-hero-top {
  padding: 1.5rem 1.75rem 1.25rem;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border-bottom: 1px solid var(--color-border);
}

.student-job-hero-top h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.student-company-line {
  font-size: 1rem;
  font-weight: 600;
  color: var(--stu-accent);
  margin: 0 0 0.75rem;
}

.student-job-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.student-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.student-job-body {
  padding: 1.5rem 1.75rem 1.75rem;
}

.student-prose h4 {
  margin: 1.25rem 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--stu-text-soft);
}

.student-prose h4:first-child {
  margin-top: 0;
}

.student-prose ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  color: #334155;
}

.student-prose p,
.student-prose div {
  margin: 0.5rem 0 0;
  color: #334155;
  line-height: 1.65;
}

/* Application status */
.student-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.student-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

a.student-pill {
  text-decoration: none;
  color: inherit;
}

a.student-pill:hover {
  text-decoration: none;
}

a.student-pill--ghost:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #334155;
}

.student-pill--ghost {
  background: #fff;
  border-color: var(--color-border);
  color: #475569;
}

.student-pill--active {
  background: var(--stu-accent-soft);
  border-color: rgba(13, 148, 136, 0.35);
  color: #0f766e;
}

.student-table-wrap {
  border-radius: 12px;
  border: 1px solid var(--color-border);
  overflow: hidden;
  background: #fff;
}

.student-portal table.data-table th {
  background: #f8fafc;
  font-size: 0.72rem;
}

.student-status {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: capitalize;
}

.student-status--applied { background: #f1f5f9; color: #475569; }
.student-status--under_review { background: #e0f2fe; color: #0369a1; }
.student-status--shortlisted { background: #fef3c7; color: #b45309; }
.student-status--selected { background: #d1fae5; color: #047857; }
.student-status--rejected { background: #fee2e2; color: #b91c1c; }

/* Drive cards */
.student-drive-card {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
  background: #fff;
  border-left: 4px solid #6366f1;
}

.student-drive-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.02rem;
  font-weight: 700;
  color: #0f172a;
}

.student-drive-dates {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.student-drive-dates dt {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--stu-text-soft);
  margin: 0;
}

.student-drive-dates dd {
  margin: 0.15rem 0 0;
  font-weight: 600;
  color: #0f172a;
  font-size: 0.9rem;
}

/* Announcements */
.student-announcement {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border);
}

.student-announcement:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.student-announcement:first-child {
  padding-top: 0;
}

.student-announcement h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.student-announcement time {
  display: block;
  font-size: 0.8rem;
  color: var(--stu-text-soft);
  margin-bottom: 0.65rem;
}

.student-announcement .body {
  color: #334155;
  line-height: 1.65;
}

/* Profile */
.student-profile-hero {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.student-profile-photo {
  width: 88px;
  height: 88px;
  border-radius: 16px;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
}

.student-profile-photo--placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--stu-accent), #0f766e);
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
}

.student-profile-hero-text h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.student-profile-hero-text p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--stu-text-soft);
}

.student-form-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #f1f5f9;
}

.student-form-section h3 {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--stu-text-soft);
}

/* Empty state */
.student-empty {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--stu-text-soft);
  font-size: 0.95rem;
}

.student-empty strong {
  display: block;
  color: #64748b;
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.student-muted {
  font-size: 0.875rem;
  color: var(--stu-text-soft);
  font-weight: 500;
}

/* Auth pages (student) */
.student-auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .student-auth-page {
    grid-template-columns: 1fr 1fr;
  }
}

.student-auth-aside {
  background: linear-gradient(160deg, #0f172a 0%, #134e4a 45%, #0f4c81 100%);
  color: #fff;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.student-auth-aside::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.9;
}

.student-auth-aside-inner {
  position: relative;
  z-index: 1;
  max-width: 380px;
}

.student-auth-aside h1 {
  margin: 0 0 1rem;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.student-auth-aside p {
  margin: 0;
  opacity: 0.9;
  line-height: 1.6;
  font-size: 0.95rem;
}

.student-auth-main {
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem;
  background: #f1f5f9;
}

.student-auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  padding: 2rem 2rem 2.25rem;
  border: 1px solid var(--color-border);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
}

.student-auth-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.student-auth-card .sub {
  margin: 0 0 1.5rem;
  color: var(--stu-text-soft);
  font-size: 0.92rem;
}

.student-auth-card .btn-primary {
  background: linear-gradient(135deg, var(--stu-accent), #0f766e);
  border: none;
}

.student-auth-card .btn-primary:hover {
  filter: brightness(1.05);
}

@media (max-width: 899px) {
  .student-auth-aside {
    min-height: 200px;
    padding: 1.75rem 1.5rem;
  }
}

@media (max-width: 960px) {
  .student-user-meta .name,
  .student-user-meta .email {
    max-width: 120px;
  }
}
