:root {
        --navy: #0B2B40; --navy-soft: #123a56; --blue: #145DA0; --blue-hover: #1B72C4;
        --blue-tint: #EAF3FB; --blue-tint-2: #D7E9F8; --ink: #10222E; --ink-soft: #4C6779;
        --line: #DCE7EF; --paper: #F6FAFD; --white: #FFFFFF; --green: #1E9E6C;
        --green-hover: #188457; --red: #D14B4B; --red-hover: #B93E3E; --radius: 12px;
        --shadow-card: 0 1px 2px rgba(11,43,64,0.04), 0 8px 24px rgba(11,43,64,0.06);
        --shadow-lift: 0 10px 30px rgba(11,43,64,0.14);
    }

    * { box-sizing: border-box; }
    html, body { margin: 0; padding: 0; background: var(--paper); color: var(--ink); font-family: 'Inter', sans-serif; -webkit-font-smoothing: antialiased; }
    body { min-height: 100vh; background-image: radial-gradient(circle at 100% 0%, var(--blue-tint) 0%, transparent 45%), radial-gradient(circle at 0% 100%, var(--blue-tint) 0%, transparent 40%); background-attachment: fixed; }
    h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; color: var(--navy); letter-spacing: -0.01em; margin: 0; }

    /* ---------- Top bar ---------- */
    .topbar { display: flex; align-items: center; justify-content: space-between; background: linear-gradient(135deg, #0a2540 0%, #0d3158 50%, #0f3b6e 100%); padding: 10px 28px; position: sticky; top: 0; z-index: 20; box-shadow: 0 4px 20px rgba(11,43,64,0.35); }
    .brand { display: flex; align-items: center; }
    .brand-badge { display: flex; align-items: center; flex-shrink: 0; }
    .brand-badge img { height: 52px; width: auto; object-fit: contain; display: block; }
    
    #nav-menu { align-items: center; gap: 22px; }
    .nav-links { display: flex; align-items: center; gap: 4px; }
    .nav-btn { appearance: none; width: auto; margin: 0; padding: 8px 16px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: rgba(255,255,255,0.72); font-family: 'Inter', sans-serif; font-weight: 600; font-size: 14px; cursor: pointer; transition: all 0.15s ease; position: relative; }
    .nav-btn:not(:last-child)::after { content: "→"; position: absolute; right: -15px; top: 50%; transform: translateY(-50%); font-size: 11px; color: rgba(255,255,255,0.25); }
    .nav-btn:hover { color: var(--white); background: rgba(255,255,255,0.08); }
    .nav-btn.admin-btn { color: #FFD98A; }
    .nav-btn.admin-btn:hover { background: rgba(255,217,138,0.14); }
    .logout-btn { width: auto; margin: 0; padding: 8px 18px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.18); background: transparent; color: rgba(255,255,255,0.85); font-weight: 600; font-size: 13px; cursor: pointer; transition: all 0.15s ease; }
    .logout-btn:hover { background: var(--red); border-color: var(--red); color: var(--white); }

    /* ---------- Layout ---------- */
    .container { max-width: 760px; margin: 0 auto; padding: 44px 24px 80px; }
    .section { display: none; }
    .active { display: block; animation: rise 0.35s ease; }
    @keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
    .panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-card); }
    .panel-header { margin-bottom: 22px; }
    .eyebrow { display: inline-flex; align-items: center; gap: 6px; font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); background: var(--blue-tint); border: 1px solid var(--blue-tint-2); padding: 4px 10px; border-radius: 999px; margin-bottom: 10px; }
    .panel-header p { color: var(--ink-soft); font-size: 14.5px; margin: 8px 0 0; line-height: 1.5; }

    /* ---------- Auth screen ---------- */
    #auth-section.section { display: none; }
    #auth-section.active { display: flex; justify-content: center; }
    .auth-card { width: 100%; max-width: 480px; background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 40px 36px; box-shadow: var(--shadow-lift); text-align: center; }
    .auth-card img.cover { height: 150px; max-width: 100%; margin: 0 auto 0; display: block; object-fit: contain; }
    .uni-branding { text-align: center; margin-bottom: 20px; }
    .uni-branding .school-name { font-family: 'Space Grotesk', sans-serif; font-size: 17px; font-weight: 700; color: #E8913A; line-height: 1.3; margin: 6px 0 4px; }
    .uni-branding .uni-name { font-family: 'Space Grotesk', sans-serif; font-size: 17px; font-weight: 600; color: var(--ink); line-height: 1.3; margin: 0; }
    .auth-card h2 { font-size: 22px; margin-bottom: 6px; }
    .auth-card .tagline { color: var(--ink-soft); font-size: 14px; margin: 0 0 26px; }
    .auth-card .fields { text-align: left; }

    /* ---------- Form elements ---------- */
    label.field-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin: 14px 0 6px; text-transform: uppercase; letter-spacing: 0.04em; }
    label.field-label:first-child { margin-top: 0; }
    input, select, textarea { width: 100%; padding: 12px 14px; margin: 0 0 4px; border-radius: 9px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); font-family: 'Inter', sans-serif; font-size: 14.5px; transition: all 0.15s ease; }
    textarea { resize: vertical; }
    input::placeholder, textarea::placeholder { color: #93A9B8; }
    input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); background: var(--white); box-shadow: 0 0 0 4px var(--blue-tint); }
    input[type="file"] { padding: 10px 12px; background: var(--white); cursor: pointer; }
    select { cursor: pointer; appearance: none; 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 fill='%23145DA0' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px; }
    button { width: 100%; padding: 12px 16px; margin: 10px 0 0; border-radius: 9px; border: none; background: var(--blue); color: var(--white); font-family: 'Inter', sans-serif; font-weight: 700; font-size: 14.5px; letter-spacing: 0.01em; cursor: pointer; transition: all 0.15s ease; box-shadow: 0 1px 2px rgba(11,43,64,0.08); }
    button:hover { background: var(--blue-hover); }
    button:active { transform: translateY(1px); }
    button.secondary { background: var(--green); }
    button.secondary:hover { background: var(--green-hover); }
    .sso-login { display: block; width: 100%; padding: 12px 16px; border-radius: 9px; background: var(--navy); color: var(--white); text-align: center; text-decoration: none; font-weight: 700; font-size: 14.5px; }
    .sso-login:hover { opacity: 0.9; }
    .back-btn { background: transparent; border: 1.5px solid var(--line); color: var(--ink-soft); box-shadow: none; width: auto; margin-bottom: 20px; margin-top: 0; }
    .back-btn:hover { background: var(--paper); border-color: var(--ink-soft); }

    /* ---------- Job / application cards ---------- */
    #jobs-container, #my-posts-container { margin-top: 20px; display: flex; flex-direction: column; gap: 14px; }
    .job-card { border: 1px solid var(--line); border-left: 4px solid var(--blue); background: var(--paper); padding: 18px 20px; border-radius: 10px; transition: all 0.15s ease; }
    .job-card:hover { box-shadow: var(--shadow-card); transform: translateY(-1px); border-left-color: var(--green); }
    .job-card h3 { font-size: 16.5px; margin-bottom: 6px; }
    .job-card p { margin: 0 0 10px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
    .job-card strong { color: var(--navy); font-weight: 600; }
    .job-card button { width: auto; padding: 9px 16px; font-size: 13px; margin-top: 4px; }
    .job-card a { display: inline-block; margin-top: 2px; color: var(--blue); font-weight: 600; font-size: 13.5px; text-decoration: none; border-bottom: 1.5px solid var(--blue-tint-2); }
    .job-card a:hover { border-bottom-color: var(--blue); }
    #upload-status { font-size: 13.5px; font-weight: 600; color: var(--green); margin-top: 10px; min-height: 18px; }
    hr.rule { border: none; border-top: 1px solid var(--line); margin: 28px 0 22px; }
    h3 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); margin: 28px 0 14px; font-family: 'JetBrains Mono', monospace; font-weight: 500; }

    /* ---------- Detailed View ---------- */
    .detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 20px 0; padding: 20px; background: var(--paper); border-radius: 12px; border: 1px solid var(--line); }
    .detail-item p { margin: 0; font-size: 14px; color: var(--ink); }
    .detail-item label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); font-weight: 600; }
    .long-text { white-space: pre-wrap; font-size: 14.5px; line-height: 1.6; color: var(--ink); margin-bottom: 25px; }

    /* ---------- Checkbox group (multi-select concentration) ---------- */
    .checkbox-group { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 4px; }
    .checkbox-label { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 9px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.15s ease; user-select: none; }
    .checkbox-label:hover { border-color: var(--blue); background: var(--blue-tint); }
    .checkbox-label:has(input:checked) { border-color: var(--blue); background: var(--blue-tint); color: var(--blue); font-weight: 600; }
    .checkbox-label input[type="checkbox"] { accent-color: var(--blue); width: 16px; height: 16px; cursor: pointer; }

    /* ---------- Modal overlay ---------- */
    .modal-overlay { position: fixed; inset: 0; background: rgba(11,43,64,0.45); display: flex; align-items: center; justify-content: center; z-index: 100; backdrop-filter: blur(4px); }
    .modal-card { background: var(--white); border-radius: 18px; padding: 36px 32px; width: 100%; max-width: 440px; box-shadow: var(--shadow-lift); animation: rise 0.25s ease; }

    /* ---------- Auth Tabs ---------- */
.auth-tabs {
  display: flex;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 20px;
  gap: 4px;
}

.auth-tab {
  flex: 1;
  padding: 9px 12px;
  margin: 0;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: none;
}

.auth-tab.active {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(20, 93, 160, 0.35);
}

.auth-tab:hover:not(.active) {
  background: rgba(20, 93, 160, 0.05);
  color: var(--blue);
}
