/* =========================================================
   JOB PORTAL — CLEAN STYLESHEET
   ========================================================= */

:root {
    --bg1: #071129;
    --bg2: #08142d;
    --bg3: #0a1d40;
    --navbg: rgba(5, 12, 35, 0.85);
    --accent: #38bdf8;
    --accent2: #4f46e5;
    --accent3: #6366f1;
    --text: #ffffff;
    --text-muted: #cbd5e1;
    --card-bg: linear-gradient(145deg, rgba(24, 38, 70, 0.95), rgba(30, 46, 84, 0.85));
    --glass-bg: rgba(255, 255, 255, 0.08);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --gutter: clamp(20px, 5vw, 60px);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Poppins", sans-serif;
    background: linear-gradient(135deg, var(--bg1), var(--bg2), var(--bg3));
    color: var(--text);
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    color: inherit;
}

/* =========================================================
   PAGE CONTAINER — keeps content off the screen edges
   ========================================================= */

.container {
    width: 92%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 60px var(--gutter);
}

/* =========================================================
   NAVBAR
   ========================================================= */

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
    padding: 0 var(--gutter);
    background: var(--navbg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    flex-direction: column;
    font-size: 34px;
    font-weight: 800;
    background: linear-gradient(90deg, var(--accent), var(--accent3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: 0.4s;
}

.logo span {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 2px;
    color: var(--text-muted);
    -webkit-text-fill-color: var(--text-muted);
}

.logo:hover {
    transform: scale(1.05);
}

.menu {
    display: flex;
    gap: 10px;
    align-items: center;
}

.menu a {
    position: relative;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: var(--text);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: 0.3s;
}

.menu a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 6px;
    width: 0;
    height: 3px;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--accent), var(--accent3));
    transform: translateX(-50%);
    transition: 0.3s;
}

.menu a:hover {
    color: var(--accent);
    background: rgba(56, 189, 248, 0.12);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.18);
}

.menu a:hover::after {
    width: 60%;
}

.menu a:active {
    transform: scale(0.96);
}

.menu .logout-btn {
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    margin: 0;
}

/* =========================================================
   HERO
   ========================================================= */

.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    padding: 80px var(--gutter);
    min-height: 70vh;
}

.hero .left {
    width: 55%;
}

.hero .left h1 {
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.1;
    margin: 0 0 20px;
}

.hero .left p {
    font-size: clamp(16px, 2.2vw, 22px);
    color: var(--text-muted);
    max-width: 520px;
}

.hero .right {
    width: 40%;
    display: grid;
    gap: 20px;
}

.hero-btns {
    display: flex;
    gap: 16px;
    margin-top: 28px;
    flex-wrap: wrap;
}

button,
.btn {
    padding: 16px 36px;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    transition: transform 0.25s, box-shadow 0.25s;
}

button:hover,
.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.25);
}

.secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* =========================================================
   GLASS CARDS (hero side panels)
   ========================================================= */

.glass {
    background: var(--glass-bg);
    color: var(--text);
    padding: 30px;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 260px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.glass:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
}

/* =========================================================
   GENERAL CARD
   ========================================================= */

.card {
    background: var(--card-bg);
    padding: 36px;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    margin-bottom: 0;
    /* spacing handled by grid `gap`, not margin, so cards don't collide with edges */
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 55px rgba(0, 0, 0, 0.35);
}

.card h2 {
    font-size: 28px;
    margin-bottom: 18px;
    color: #60a5fa;
}

.card p {
    margin-top: 10px;
    font-size: 17px;
    line-height: 1.8;
    color: #dbeafe;
}

.card ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0;
    margin-top: 22px;
}

.card li {
    background: var(--glass-bg);
    padding: 12px 18px;
    border-radius: 30px;
    font-size: 15px;
}

/* =========================================================
   ABOUT SECTION
   ========================================================= */

.about {
    padding: 80px var(--gutter);
    text-align: center;
}

.about-grid,
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 40px;
}

/* =========================================================
   DASHBOARD GRID (stat tiles)
   ========================================================= */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 50px;
}

/* Dynamic lists (variable item count) should wrap naturally instead of forcing 3 fixed columns */
#manageJobs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 50px;
}

.dashboard-grid .card {
    min-height: 180px;
    padding: 28px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* =========================================================
   APPLICATIONS / JOBS GRID
   ========================================================= */

#jobs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
    margin: 30px 0 50px;

    padding: 0 var(--gutter);
}

#applications {
    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));

    gap: 25px;

}

/* =========================
   Jobs Page
========================= */

#jobs .card{
    padding:32px;
}

#jobs h2{
    color:#60a5fa;
    margin-bottom:16px;
}

#jobs button{
    margin-top:22px;
}

/* =========================
   Candidate Dashboard
========================= */

#applications .card{
    padding:25px;
}

#applications h2{
    color:#60a5fa;
    margin-bottom:20px;
}

#applications p{
    margin:18px 0;
}

#applications strong{
    display:block;
    margin-bottom:6px;
}

#applications span{
    display:block;
    white-space:normal;
    word-break:break-word;
    overflow-wrap:anywhere;
}
/* =========================================================
   BOTTOM GRID (skills + interview tips, etc.)
   ========================================================= */

.bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 20px;
    padding: 0 var(--gutter);
}

.tips p {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* =========================================================
   FORM ELEMENTS
   ========================================================= */

.form-box {
    display: flex;
    justify-content: center;
    padding: 50px var(--gutter);
}

.form-box .card,
.form-box form {
    width: 100%;
    max-width: 440px;
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.form-box .card button,
.form-box form button {
    margin-top: 25px;
}

input,
select,
textarea {
    width: 100%;
    padding: 16px;
    margin-top: 14px;
    border: none;
    border-radius: 14px;
    background: #142445;
    color: var(--text);
    font-size: 16px;
    outline: none;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

select option {
    background: #111827;
    color: var(--text);
}

label {
    display: block;
    margin-top: 14px;
    margin-bottom: 8px;
    font-weight: 600;
}

.center {
    text-align: center;
}

.center>input {
    font-size: 18px;
    color: var(--text);
}

/* =========================================================
   SEARCH + FILTER (jobs page)
   ========================================================= */

.search-box {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin: 40px var(--gutter);
}

#search {
    flex: 2 1 380px;
    max-width: 480px;
    padding: 18px;
    border: none;
    border-radius: 16px;
    background: var(--glass-bg);
    color: var(--text);
    font-size: 16px;
    outline: none;
}

#filter {
    flex: 1 1 220px;
    max-width: 280px;
    padding: 18px;
    border: none;
    border-radius: 16px;
    background: var(--glass-bg);
    color: var(--text);
    font-size: 16px;
    outline: none;
    cursor: pointer;
}

#filter option {
    background: #0f172a;
    color: var(--text);
}

/* =========================================================
   JOB DETAIL PAGE
   ========================================================= */

.detail-card {
    max-width: 900px;
    margin: 30px auto;
    padding: 50px;
}

.detail-card h2 {
    font-size: 38px;
    margin-bottom: 18px;
    color: #60a5fa;
}

.detail-card p {
    margin: 16px 0;
    font-size: 18px;
    line-height: 1.8;
}

.detail-buttons {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 36px;
    flex-wrap: wrap;
}

/* =========================================================
   MISC STATES
   ========================================================= */

.loading {
    font-size: 22px;
    text-align: center;
    color: #94a3b8;
    padding: 40px var(--gutter);
}

.empty {
    max-width: 500px;
    margin: 50px auto;
    text-align: center;
    padding: 50px var(--gutter);
}

.empty h2 {
    color: #60a5fa;
    margin-bottom: 18px;
}

.empty p {
    margin-bottom: 18px;
}

ul {
    padding-left: 20px;
    line-height: 2;
}

table {
    width: 100%;
    border-collapse: collapse;
}

footer {
    text-align: center;
    padding: 40px var(--gutter);
    color: var(--text-muted);
}

/* =========================================================
   RESPONSIVE — TABLET
   ========================================================= */

@media (max-width: 1024px) {

    .about-grid,
    .features,
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bottom-grid {
        grid-template-columns: 1fr;
    }

    .hero .left {
        width: 60%;
    }
}

/* =========================================================
   RESPONSIVE — MOBILE
   ========================================================= */

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        height: auto;
        gap: 14px;
        padding: 16px var(--gutter);
        text-align: center;
    }

    .menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding: 40px var(--gutter);
        min-height: auto;
    }

    .hero .left,
    .hero .right {
        width: 100%;
    }

    .hero .left p {
        margin: 0 auto;
    }

    .hero-btns {
        justify-content: center;
    }

    .glass {
        max-width: 100%;
    }

    .about,
    .form-box {
        padding: 50px var(--gutter);
    }

    .about-grid,
    .features,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    #applications,
    #jobs {
        grid-template-columns: 1fr;
    }

    .container {
        width: 90%;
        padding: 40px var(--gutter);
    }

    .card {
        padding: 26px;
    }

    .card ul {
        grid-template-columns: 1fr;
    }

    .search-box {
        flex-direction: column;
        align-items: stretch;
        margin: 30px var(--gutter);
    }

    #search,
    #filter {
        flex: 0 0 auto;
        max-width: 100%;
    }

    .detail-card {
        padding: 30px var(--gutter);
    }

    .detail-buttons {
        flex-direction: column;
    }

    table {
        display: block;
        overflow-x: auto;
    }

    img {
        max-width: 100%;
        height: auto;
    }

    button,
    .btn {
        width: 100%;
    }

    .hero-btns button,
    .hero-btns .btn,
    .menu .logout-btn {
        width: auto;
    }

    .form-box .card,
    .form-box form {
        padding: 28px;
    }
}

/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {
    .hero .left h1 {
        font-size: 30px;
    }

    .logo {
        font-size: 28px;
    }

    .card {
        padding: 20px;
    }
}

/* ===============================
   Candidate Applications
================================== */

#applications {

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));

    gap: 25px;

    margin: 30px auto;

    width: 100%;

}

#applications .card {

    width: 100%;

    max-width: 400px;

    margin: auto;

    padding: 22px;

    text-align: center;

}

#applications h2 {

    color: #5fa8ff;

    font-size: 2rem;

    margin-bottom: 20px;

}

#applications p {

    margin: 18px 0;

}

#applications strong {

    display: block;

    margin-bottom: 8px;

    color: #fff;

}

#applications span {

    display: block;

    width: 100%;

    white-space: normal;

    overflow-wrap: break-word;

    word-break: break-word;

    font-size: 15px;

}

.status-badge {

    display: inline-block;

    background: #2ecc71;

    color: #fff !important;

    padding: 8px 18px;

    border-radius: 20px;

    font-weight: 600;

}

@media(max-width:768px) {

    #applications {

        grid-template-columns: 1fr;

        padding: 0 10px;

    }

    #applications .card {

        width: 100%;

        max-width: 100%;

        padding: 18px;

    }

    #applications h2 {

        font-size: 26px;

    }

    #applications p {

        font-size: 15px;

    }

}
