:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #ec4899;
    --accent: #f59e0b;
    --background: #0f172a;
    --card-bg: #1e293b;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    --success: #10b981;
    --danger: #ef4444;
    --glass: rgba(30, 41, 59, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Glassmorphism utility */
.glass {
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    gap: 0.5rem;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

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

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

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

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Header */
header {
    height: 80px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: 2rem;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

nav a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-muted);
}

nav a:hover,
nav a.active {
    color: var(--primary);
}

nav a.active {
    font-weight: 700;
}

/* Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Inputs */
.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

input,
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: #0f172a;
    border: 1px solid var(--border);
    color: var(--text);
    outline: none;
    font-size: 16px;
    /* Prevents zoom on iOS */
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 900;
    line-height: 1.1;
}

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

/* Job Grid */
.job-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.job-card {
    transition: 0.3s;
}

.job-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Badges */
.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    display: inline-block;
}

.badge-active {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.badge-closed {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.badge-primary {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

/* Table styles */
.table-container {
    overflow-x: auto;
    border-radius: 0.75rem;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 600px;
}

th {
    background: rgba(15, 23, 42, 0.5);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1rem;
    border-bottom: 2px solid var(--border);
    text-align: left;
    white-space: nowrap;
}

td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

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

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ================================================
   MOBILE RESPONSIVE STYLES
   ================================================ */

/* Tablet (768px and below) */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    /* Mobile Navigation */
    .mobile-menu-toggle {
        display: block;
    }

    nav {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--card-bg);
        flex-direction: column;
        padding: 1.5rem;
        gap: 1rem;
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    nav.mobile-menu-open {
        transform: translateY(0);
    }

    nav a {
        font-size: 1.1rem;
        padding: 0.75rem 0;
        width: 100%;
        text-align: center;
    }

    /* Hero */
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    /* Job Grid */
    .job-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Cards */
    .card {
        padding: 1rem;
    }

    /* Buttons */
    .btn {
        width: 100%;
        justify-content: center;
    }

    /* Tables */
    table {
        font-size: 0.875rem;
    }

    th,
    td {
        padding: 0.75rem 0.5rem;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    header {
        height: 70px;
    }

    .logo {
        font-size: 1.25rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
    }

    .btn-sm {
        padding: 0.35rem 0.65rem;
        font-size: 0.8rem;
    }

    /* Job Cards - Stack elements */
    .job-card h3 {
        font-size: 1.25rem;
    }

    /* Form inputs - larger for mobile */
    input,
    select,
    textarea {
        padding: 0.85rem 1rem;
        font-size: 16px;
    }

    /* Table - more compact */
    table {
        font-size: 0.8rem;
    }

    th {
        font-size: 0.65rem;
        padding: 0.65rem 0.4rem;
    }

    td {
        padding: 0.65rem 0.4rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {

    /* Larger tap targets for mobile */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }

    nav a {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Remove hover effects on touch devices */
    .job-card:hover {
        transform: none;
    }

    .btn-primary:hover {
        transform: none;
    }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 2rem 0;
    }

    .hero h1 {
        font-size: 2rem;
    }
}

/* ================================================
   JOB DETAILS PAGE STYLES
   ================================================ */

.job-title {
    font-size: 3rem;
    margin: 0.5rem 0;
    font-weight: 900;
    line-height: 1.1;
}

.job-meta {
    display: flex;
    gap: 2rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.job-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.job-content-grid {
    display: grid;
    grid-template-columns: 2fr 1.2fr;
    gap: 2rem;
}

.success-message {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
}

/* Mobile styles for job details */
@media (max-width: 768px) {
    .job-title {
        font-size: 2rem;
    }

    .job-meta {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .job-meta span {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 140px;
    }

    .job-content-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .job-title {
        font-size: 1.75rem;
    }

    .job-meta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .job-meta span {
        flex: 1 1 100%;
    }
}