@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

/* ── DARK MODE (default) ─────────────────────────────────── */
:root {
    --bg: #0a0a0f;
    --surface: #12121a;
    --surface2: #1a1a26;
    --border: #2a2a3d;
    --accent: #6c63ff;
    --accent2: #ff6584;
    --accent3: #43e97b;
    --text: #e8e8f0;
    --text-muted: #8888a8;
    --text-dim: #55556a;
    --card-glow: rgba(108, 99, 255, 0.08);
    --shadow: rgba(0, 0, 0, 0.3);
}

/* ── LIGHT MODE ──────────────────────────────────────────── */
[data-theme="light"] {
    --bg: #f4f4fb;
    --surface: #ffffff;
    --surface2: #eeeef7;
    --border: #d4d4e8;
    --accent: #6c63ff;
    --accent2: #ff6584;
    --accent3: #1aab55;
    --text: #111128;
    --text-muted: #555570;
    --text-dim: #9898b0;
    --card-glow: rgba(108, 99, 255, 0.05);
    --shadow: rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

/* Don't transition transforms or layout properties */
*,
*::before,
*::after {
    transition-property: background-color, border-color, color, box-shadow, opacity;
    transition-duration: 0.3s;
    transition-timing-function: ease;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(108, 99, 255, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(67, 233, 123, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    transition: background 0.4s ease;
}

[data-theme="light"] body::before {
    background:
        radial-gradient(ellipse at 20% 20%, rgba(108, 99, 255, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(67, 233, 123, 0.03) 0%, transparent 50%);
}

/* ── NAV ─────────────────────────────────────────────────── */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    transition: background 0.3s ease;
}

[data-theme="light"] nav {
    background: rgba(244, 244, 251, 0.95);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    gap: 1rem;
}

.logo {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.logo-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(0.8);
    }
}

/* Right-side nav: always visible, wraps on very small screens */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    list-style: none;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 400;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--text);
    background: var(--surface2);
}

/* ── THEME TOGGLE BUTTON ─────────────────────────────────── */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border-radius: 20px;
    border: 2px solid var(--accent);
    background: rgba(108, 99, 255, 0.15);
    color: var(--accent);
    cursor: pointer;
    font-size: 0.8rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    transition: all 0.2s;
    flex-shrink: 0;
    white-space: nowrap;
    line-height: 1;
    /* Force it to never collapse or hide */
    min-width: fit-content;
    visibility: visible !important;
    opacity: 1 !important;
}

.theme-toggle:hover {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 0 16px rgba(108, 99, 255, 0.5);
    transform: translateY(-1px);
}

.t-icon {
    font-size: 0.95rem;
}

.t-label {
    font-size: 0.78rem;
    font-weight: 700;
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: #7c74ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(108, 99, 255, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(108, 99, 255, 0.08);
}

.btn-ghost {
    background: var(--surface2);
    color: var(--text-muted);
}

.btn-ghost:hover {
    color: var(--text);
    background: var(--border);
}

/* ── HERO ────────────────────────────────────────────────── */
.hero {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2rem 4rem;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border: 1px solid rgba(108, 99, 255, 0.3);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 2rem;
    background: rgba(108, 99, 255, 0.06);
}

.hero h1 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.hero h1 .highlight {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
    font-weight: 300;
}

.hero-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 4rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border);
}

.stat {
    text-align: center;
}

.stat-num {
    font-family: 'Syne', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ── SECTION ─────────────────────────────────────────────── */
.section {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.section-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ── CARDS ───────────────────────────────────────────────── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--card-glow);
    opacity: 0;
    transition: opacity 0.25s;
}

.card:hover {
    border-color: rgba(108, 99, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px var(--shadow);
}

.card:hover::before {
    opacity: 1;
}

.card-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.tag-research {
    background: rgba(108, 99, 255, .15);
    color: #a59dff;
}

.tag-internship {
    background: rgba(67, 233, 123, .12);
    color: #43e97b;
}

.tag-product {
    background: rgba(255, 101, 132, .12);
    color: #ff6584;
}

.tag-analytics {
    background: rgba(255, 170, 0, .12);
    color: #ffaa00;
}

.tag-default {
    background: rgba(136, 136, 168, .12);
    color: var(--text-muted);
}

[data-theme="light"] .tag-research {
    background: rgba(108, 99, 255, .12);
    color: #5550cc;
}

[data-theme="light"] .tag-internship {
    background: rgba(26, 171, 85, .12);
    color: #1aab55;
}

[data-theme="light"] .tag-product {
    background: rgba(255, 101, 132, .12);
    color: #d93258;
}

[data-theme="light"] .tag-analytics {
    background: rgba(180, 120, 0, .12);
    color: #a07000;
}

.card h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.card-company {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 1rem;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.card-deadline {
    font-size: 0.78rem;
    color: var(--text-dim);
}

/* ── FORMS ───────────────────────────────────────────────── */
.auth-wrap {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

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

.auth-card h2 {
    font-family: 'Syne', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.auth-card .subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    transition: border-color 0.2s, background 0.3s;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.12);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group select option {
    background: var(--surface2);
}

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

.auth-footer a {
    color: var(--accent);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ── ALERTS ──────────────────────────────────────────────── */
.alerts {
    max-width: 1200px;
    margin: 1rem auto 0;
    padding: 0 2rem;
    z-index: 10;
    position: relative;
}

.alert {
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.88rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-success {
    background: rgba(67, 233, 123, 0.1);
    border: 1px solid rgba(67, 233, 123, 0.25);
    color: var(--accent3);
}

.alert-error {
    background: rgba(255, 101, 132, 0.1);
    border: 1px solid rgba(255, 101, 132, 0.25);
    color: #ff6584;
}

/* ── PAGE HEADER ─────────────────────────────────────────── */
.page-header {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem 1.5rem;
}

.page-header h1 {
    font-family: 'Syne', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ── FILTERS ─────────────────────────────────────────────── */
.filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.filter-btn {
    padding: 5px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    transition: all 0.2s;
    cursor: pointer;
}

.filter-btn:hover,
.filter-btn.active {
    color: var(--accent);
    border-color: rgba(108, 99, 255, 0.4);
    background: rgba(108, 99, 255, 0.08);
}

/* ── DASHBOARD ───────────────────────────────────────────── */
.dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.25rem;
}

.stat-card .num {
    font-family: 'Syne', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-card .lbl {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-dim);
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
}

td {
    padding: 14px 16px;
    font-size: 0.88rem;
    border-bottom: 1px solid rgba(42, 42, 61, 0.5);
    vertical-align: middle;
}

[data-theme="light"] td {
    border-bottom: 1px solid var(--border);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(108, 99, 255, 0.03);
}

.status-badge {
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-pending {
    background: rgba(255, 170, 0, .12);
    color: #ffaa00;
}

.status-accepted {
    background: rgba(67, 233, 123, .12);
    color: #43e97b;
}

.status-rejected {
    background: rgba(255, 101, 132, .12);
    color: #ff6584;
}

[data-theme="light"] .status-pending {
    background: rgba(200, 130, 0, .1);
    color: #a07000;
}

[data-theme="light"] .status-accepted {
    background: rgba(26, 171, 85, .1);
    color: #1a7a40;
}

[data-theme="light"] .status-rejected {
    background: rgba(200, 50, 80, .1);
    color: #b02040;
}

/* ── APPLY PAGE ──────────────────────────────────────────── */
.apply-wrap {
    max-width: 680px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.opp-preview {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.apply-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
}

/* ── EMPTY STATE ─────────────────────────────────────────── */
.empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.empty h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

/* ── FOOTER ──────────────────────────────────────────────── */
footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    margin-top: 4rem;
    padding: 2rem;
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-dim);
}

/* ── ROLE BADGES ─────────────────────────────────────────── */
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 12px;
    border-radius: 100px;
    font-size: .75rem;
    font-weight: 600;
}

.role-student {
    background: rgba(108, 99, 255, .15);
    color: #a59dff;
    border: 1px solid rgba(108, 99, 255, .3);
}

.role-company {
    background: rgba(255, 101, 132, .12);
    color: #ff6584;
    border: 1px solid rgba(255, 101, 132, .3);
}

[data-theme="light"] .theme-toggle {
    border-color: var(--accent);
    background: rgba(108, 99, 255, 0.08);
    color: var(--accent);
}

[data-theme="light"] nav {
    background: rgba(244, 244, 251, 0.92);
}

/* ── DASHBOARD TABS ──────────────────────────────────────── */
.dash-tabs {
    display: flex;
    gap: .25rem;
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    max-width: 1200px;
    margin: 0 auto;
    overflow-x: auto;
    scrollbar-width: none;
}

.dash-tabs::-webkit-scrollbar {
    display: none;
}

.dash-tab {
    padding: 12px 18px;
    font-size: .88rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: all .2s;
}

.dash-tab:hover {
    color: var(--text);
}

.dash-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ── COMPANY AVATAR ──────────────────────────────────────── */
.company-avatar {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: .85rem;
    color: #fff;
    flex-shrink: 0;
}

/* ── PROFILE FIELDS ──────────────────────────────────────── */
.profile-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .65rem 0;
    border-bottom: 1px solid var(--border);
    font-size: .88rem;
}

.pf-label {
    color: var(--text-muted);
    font-size: .8rem;
}

/* ── APPLICANT CARDS ─────────────────────────────────────── */
.applicant-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.25rem;
    transition: border-color .2s;
}

.applicant-card:hover {
    border-color: rgba(108, 99, 255, .35);
}

.applicant-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.cover-msg {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: .84rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.status-select {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 12px;
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: .82rem;
    cursor: pointer;
    outline: none;
}

.status-select:focus {
    border-color: var(--accent);
}

.email-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    color: var(--text-muted);
    cursor: pointer;
}

.email-checkbox input {
    accent-color: var(--accent);
}

/* ── ROLE TOGGLE (register) ──────────────────────────────── */
.role-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}

.role-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    cursor: pointer;
    transition: all .2s;
    background: var(--surface2);
}

.role-option input {
    display: none;
}

.role-option:hover {
    border-color: rgba(108, 99, 255, .4);
    background: rgba(108, 99, 255, .05);
}

.role-option.active {
    border-color: var(--accent);
    background: rgba(108, 99, 255, .1);
}

.role-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.role-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.role-text strong {
    font-size: .85rem;
    color: var(--text);
}

.role-text small {
    font-size: .72rem;
    color: var(--text-muted);
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .dash-grid {
        grid-template-columns: 1fr 1fr;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 0.8rem;
    }

    th,
    td {
        padding: 10px 12px;
    }

    /* Mobile nav: stack logo above links */
    nav {
        padding: 0.75rem 1rem;
    }

    .nav-inner {
        flex-direction: column;
        align-items: flex-start;
        min-height: unset;
        gap: 0.5rem;
        padding: 0.25rem 0;
    }

    .nav-links {
        width: 100%;
        gap: 0.3rem;
    }

    .nav-links a {
        font-size: 0.82rem;
        padding: 5px 10px;
    }

    .theme-toggle {
        padding: 6px 12px;
        font-size: 0.76rem;
    }

    .t-label {
        display: none;
    }

    /* icon only on very small screens */
}

@media(max-width:900px) {
    .dash-grid[style*="repeat(4"] {
        grid-template-columns: 1fr 1fr !important;
    }
}

@media(max-width:480px) {
    .role-options {
        grid-template-columns: 1fr;
    }

    .dash-grid[style*="repeat(4"] {
        grid-template-columns: 1fr 1fr !important;
    }
}