/* ==========================================================================
   PK JOBS HUB - EMPLOYER PORTAL MAIN STYLESHEET
   ========================================================================== */

/* ================= ROOT VARIABLES ================= */
:root {
    --primary: #16a34a;          /* Success / Active Green */
    --primary-hover: #15803d;
    --blue: #2563eb;             /* PK Jobs Hub Core Brand Blue */
    --blue-hover: #1d4ed8;
    --dark: #0f172a;             /* Dark Slate Text/Headers */
    --muted: #64748b;            /* Muted Subtitles & Captions */
    --bg: #f8fafc;               /* Crisp Light Background */
    --card: #ffffff;             /* Pure White Card Background */
    --border: #e2e8f0;           /* Clean Border Tone */
    --shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 12px 35px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --error: #ef4444;
}

/* ================= BASE RESET & PREVENT OVERFLOW ================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--dark);
    margin: 0;
    padding: 0;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--blue-hover);
}

/* ================= CONTAINERS ================= */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
}

.container.small {
    max-width: 480px;
    margin: 40px auto;
    padding: 0 20px;
}

/* ================= TYPOGRAPHY ================= */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.25;
}

h1 { font-size: clamp(24px, 5vw, 36px); }
h2 { font-size: 24px; margin-bottom: 20px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }
h5 { font-size: 14px; }
h6 { font-size: 12px; }

p {
    margin: 0;
    line-height: 1.6;
    color: var(--dark);
}

.small {
    font-size: 12px;
    color: var(--muted);
}

label {
    display: block;
    margin-top: 14px;
    margin-bottom: 6px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--dark);
    text-align: left;
}

/* ================= TEXT UTILITIES ================= */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-muted { color: var(--muted); }

.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }

/* ================= TOPBAR ================= */
.topbar {
    position: sticky;
    top: 0;
    z-index: 999;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    padding: 6px 0;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 15px;
    max-width: 1100px;
    margin: 0 auto;
}

.logo-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.logo-wrap h3 {
    margin: 0;
    text-align: left;
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.88rem;
    color: #475569;
    font-weight: 500;
}

.top-actions span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.top-actions i {
    font-size: 0.95rem;
    color: var(--blue);
}

/* AD STRIP */
.top-ad {
    width: auto;
    max-width: 728px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-ad img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

/* ================= HEADER ================= */
.header {
    background: #ffffff;
    padding: 16px 20px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    flex-wrap: wrap;
    gap: 12px;
}

.header h1,
.header h2 {
    font-size: 18px;
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.header-sub {
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px;
}

/* ================= HERO ================= */
.hero {
    text-align: center;
    padding: 50px 20px 30px;
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    border-bottom: 1px solid var(--border);
}

.hero h1 {
    font-size: clamp(24px, 5vw, 36px);
    margin-bottom: 8px;
}

.hero p {
    font-size: 15px;
    color: var(--muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ================= CARDS & LAYOUT GRIDS ================= */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 22px;
    margin-top: 30px;
}

.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: clamp(20px, 4vw, 34px);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    border: 1px solid var(--border);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

/* Radial Glow Decor */
.card::before {
    content: "";
    position: absolute;
    top: -60px;
    right: -60px;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08), transparent);
    border-radius: 50%;
    z-index: 0;
}

.card * {
    position: relative;
    z-index: 1;
}

.card h2 {
    margin: 10px 0;
    font-size: 20px;
}

.card h3 {
    font-size: 14px;
    color: var(--muted);
}

.card p {
    font-size: 13.5px;
    color: var(--muted);
    margin: 10px 0 20px;
    line-height: 1.5;
}

/* ================= FORMS & INPUTS ================= */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    margin-top: 5px;
    font-size: 14px;
    font-family: inherit;
    color: var(--dark);
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

textarea {
    resize: vertical;
}

/* ================= BUTTONS ================= */
button,
input[type="submit"] {
    margin-top: 15px;
    width: 100%;
    padding: 12px 18px;
    border: none;
    background: var(--primary);
    color: #ffffff;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.1s ease;
}

button:hover,
input[type="submit"]:hover {
    background: var(--primary-hover);
}

button:active,
input[type="submit"]:active {
    transform: scale(0.98);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    transition: all 0.2s ease;
    color: #ffffff !important;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
}

.primary { background: var(--primary); }
.primary:hover { background: var(--primary-hover); }

.btn-blue {
    background: var(--blue);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}
.btn-blue:hover {
    background: var(--blue-hover);
}

.btn-green {
    background: var(--primary);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.2);
}
.btn-green:hover {
    background: var(--primary-hover);
}

.logout { background: var(--error); }
.logout:hover { background: #dc2626; }

/* ================= ALERTS & MESSAGES ================= */
.alert {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
}

.msg {
    padding: 12px 16px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
    font-size: 14px;
}

/* ================= JOB LISTING & BADGES ================= */
.job-list { margin-top: 20px; }

.job-item {
    background: #ffffff;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.badge {
    background: var(--primary);
    color: #ffffff;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    display: inline-block;
}

.job-ad-container {
    grid-column: 1 / -1;
    margin: 20px 0;
    text-align: center;
}

/* ================= PROFILE COMPONENTS ================= */
.profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile img {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    object-fit: contain;
    background: #ffffff;
}

/* ================= FOOTER ================= */
.foot, .note {
    margin-top: 35px;
    text-align: center;
    font-size: 12.5px;
    color: var(--muted);
}

.footer {
    margin-top: 60px;
    background: var(--dark);
    color: #cbd5e1;
    padding: 45px 20px 20px;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    text-align: left;
}

.footer h3 {
    color: #ffffff;
    margin-bottom: 14px;
    font-size: 16px;
}

.footer p {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.6;
}

.footer a {
    display: block;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 13px;
    margin-bottom: 8px;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 30px;
    padding-top: 20px;
    text-align: center;
    font-size: 12px;
    color: #64748b;
}

.socials {
    margin-top: 12px;
}

.socials a {
    display: inline-block;
    margin-right: 12px;
    font-size: 18px;
    color: #cbd5e1;
}

.socials a:hover {
    color: var(--blue);
}

/* ================= EXTRA SMALL DEVICE BREAKPOINTS ================= */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .hero {
        padding: 35px 12px 20px;
    }

    .profile {
        flex-direction: column;
        text-align: center;
    }

    .profile img {
        width: 50px;
        height: 50px;
    }

    .btn, button {
        font-size: 13.5px;
        padding: 10px;
    }

    .topbar-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}