@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;700&display=swap');

:root {
    --bg: #fdf2f8; /* Very soft pink/purple tint */
    --surface: rgba(255, 255, 255, 0.7);
    --card: #ffffff;
    --primary: #6366f1; /* Modern Indigo */
    --primary-hover: #4f46e5;
    --secondary: #ec4899; /* Vibrant Pink/Magenta accent */
    --accent: #1e1b4b; /* Deep Indigo for text/headers */
    --text-main: #334155;
    --text-muted: #64748b;
    --border: rgba(226, 232, 240, 0.8);
    --radius: 16px;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(99, 102, 241, 0.1) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(236, 72, 153, 0.1) 0px, transparent 50%),
        #f8fafc;
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.4;
    padding: 14px 18px;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 6px 16px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--glass-border);
}

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

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

.logo-text {
    display: flex;
    flex-direction: column;
}

.brand {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.tagline {
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.topbar-right {
    display: flex;
    gap: 8px;
}

.sync-pill {
    display: flex;
    flex-direction: column;
    padding: 3px 10px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    min-width: 85px;
}

.sync-pill .label {
    font-size: 0.58rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sync-pill .timer {
    font-family: 'Outfit', sans-serif;
    font-size: 0.80rem;
    font-weight: 600;
}

.sync-pill.views {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.1);
}

.sync-pill.views .timer {
    color: #ef4444;
}

.sync-pill.jobs {
    background: rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.1);
}

.sync-pill.jobs .timer {
    color: var(--primary);
}

.top-filter-area {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
}

.filter-header-left h2 {
    font-family: 'Outfit', sans-serif;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.filter-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 6px 10px;
    margin-bottom: 8px;
}

.filter-controls label {
    display: flex;
    flex-direction: column;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    gap: 2px;
    transition: color 0.2s ease;
}

.filter-controls input {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 6px;
    background: #ffffff;
    font-size: 0.78rem;
    font-weight: 500;
    height: 28px;
    transition: all 0.2s ease;
    outline: none;
    color: var(--accent);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.filter-controls input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
    background: white;
}

#globalSearch {
    background: #f8faff;
    border-color: rgba(99, 102, 241, 0.35);
}

#globalSearch:focus {
    background: #ffffff;
}

.filter-controls label:hover span {
    color: var(--primary);
}

.filter-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
}

.btn-primary,
.btn-clear {
    padding: 4px 14px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.78rem;
    cursor: pointer;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: white;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5, var(--primary));
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.35);
}

.btn-clear {
    background: #f1f5f9;
    color: #475569;
}

.btn-clear:hover {
    background: #e2e8f0;
}

.sort-control {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: auto; /* Push buttons to the right */
}

.sort-control label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sort-control select {
    padding: 3px 26px 3px 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: white;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.78rem;
    height: 28px;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 13px;
}

.sort-control select:hover {
    border-color: var(--primary);
    background-color: #f8fafc;
}

.sort-control select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

/* Table Container - Floating Card Style */
.table-space {
    width: 100%;
    overflow: visible;
    padding-bottom: 12px;
}

.styled-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 5px; /* Vertical gap between rows */
    margin-top: -5px;
}

.styled-table thead {
    position: sticky;
    top: 54px;
    z-index: 50;
}

.styled-table th {
    padding: 9px 10px;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-top: 1px solid #e2e8f0;
    border-bottom: 2px solid #cbd5e1;
    background: #f8fafc !important;
    position: sticky;
    top: 54px; /* Clearly below the sticky topbar */
    z-index: 50;
    box-shadow: 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.styled-table tbody tr {
    background: white;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.styled-table tbody tr:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.08);
    background-color: white;
    z-index: 5;
}

.styled-table td {
    padding: 8px 10px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: white;
    font-size: 0.82rem;
}

/* Rounded corners for the row-card */
.styled-table td:first-child {
    border-left: 1px solid var(--border);
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.styled-table td:last-child {
    border-right: 1px solid var(--border);
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Fixed Column Widths & Anti-wrapping */
.styled-table th:nth-child(1), .styled-table td:nth-child(1) {
    width: 42px !important;
    min-width: 40px !important;
    white-space: nowrap !important;
    text-align: center !important;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.styled-table th:nth-child(2), .styled-table td:nth-child(2) {
    width: 130px !important;
    min-width: 125px !important;
    white-space: nowrap !important;
    text-align: center !important;
}

.styled-table th:nth-child(3), .styled-table td:nth-child(3) {
    width: 140px !important;
    min-width: 135px !important;
    white-space: nowrap !important;
    text-align: center !important;
}

.styled-table th:nth-child(4), .styled-table td:nth-child(4) {
    min-width: 220px;
}

/* Views Badge Style */
.styled-table td:nth-child(2) a {
    display: inline-flex;
    align-items: center;
    background: #eff6ff;
    color: #1e40af;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #dbeafe;
    transition: all 0.2s;
}

.styled-table td:nth-child(2) a:hover {
    background: #dbeafe;
    text-decoration: none;
}

/* Title Styling (Column 4) */
.styled-table td:nth-child(4) {
    min-width: 180px;
    max-width: 250px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Positions Column (Column 5) */
.styled-table td:nth-child(5),
.styled-table th.col-pos,
.styled-table td.col-pos {
    width: 50px !important;
    max-width: 60px !important;
    text-align: center !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
    white-space: nowrap !important;
}

/* Location (State, City) & Recruiter */
.styled-table td:nth-child(6),
.styled-table td:nth-child(7),
.styled-table td:nth-child(8) {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
    max-width: 150px !important;
}

/* Company */
.styled-table td:nth-child(9) {
    font-weight: 500;
    color: var(--text-main);
    max-width: 200px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Date columns */
.styled-table td:nth-child(10),
.styled-table td:nth-child(11) {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.styled-table tbody tr.no-results td {
    text-align: center;
    padding: 40px;
    color: #ef4444;
    font-weight: 500;
}

a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

a:hover {
    text-decoration: underline;
}

/* Responsive Media Queries */
@media (max-width: 1200px) {
    .filter-controls {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    body {
        padding: 12px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 16px;
    }

    .topbar-right {
        width: 100%;
        justify-content: space-between;
    }

    .sync-pill {
        flex: 1;
        min-width: 0;
    }

    .top-filter-area {
        padding: 16px;
    }

    .filter-actions {
        flex-direction: column;
    }

    .btn-primary, .btn-clear {
        width: 100%;
    }

    /* Hide less critical columns on mobile */
    .styled-table th:nth-child(10), .styled-table td:nth-child(10), /* Created */
    .styled-table th:nth-child(11), .styled-table td:nth-child(11) { /* Updated */
        display: none;
    }
}

/* --- Job Details Specific Styles (Merged) --- */

.brand-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--accent);
    letter-spacing: -0.02em;
}

.page-container {
    max-width: 1100px;
    margin: auto;
    padding: 0 24px;
}

.job-header {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    margin-bottom: 32px;
    box-shadow: var(--shadow);
}

.job-header .job-title {
    font-family: 'Outfit', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 16px;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.5);
    padding: 6px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.section {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    margin-bottom: 32px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.section:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.8);
}

.section-header {
    padding: 20px 32px;
    background: rgba(255, 255, 255, 0.4);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--accent);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.section-body {
    padding: 24px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

.detail-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.detail-value {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
}

.description {
    line-height: 1.7;
    color: var(--text-main);
    font-size: 1rem;
}

.description p {
    margin-bottom: 1.5rem;
}

.description ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.badge-status {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #166534;
    box-shadow: 0 2px 4px rgba(22, 101, 52, 0.1);
}
