/* 
 * Google Jobs Board - Premium Theme CSS
 * Zero-dependency, modern design featuring CSS variables, responsive grid, and elegant interactions.
 */

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

:root {
    /* Color Palette - Dark Mode default */
    --bg-primary: #0b0f19;
    --bg-secondary: #151d30;
    --bg-card: #1b2640;
    --border-color: #2b3a5a;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --primary-color: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.15);
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --secondary-color: #14b8a6;
    
    /* Status Badges */
    --color-full-time: #10b981;
    --color-part-time: #f59e0b;
    --color-contract: #3b82f6;
    --color-temporary: #ec4899;
    --color-intern: #a855f7;
    
    /* Layout */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

/* Light Mode theme overrides */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --primary-color: #4f46e5;
    --primary-glow: rgba(79, 70, 229, 0.1);
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 45px -15px rgba(15, 23, 42, 0.08);
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    padding-bottom: 60px;
    transition: var(--transition-smooth);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(20, 184, 166, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Base Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header & Navigation */
header {
    background-color: rgba(21, 29, 48, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition-smooth);
}

[data-theme="light"] header {
    background-color: rgba(255, 255, 255, 0.8);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.6rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span {
    color: var(--text-primary);
    -webkit-text-fill-color: initial;
}

.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    position: relative;
    padding: 6px 0;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition-smooth);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after {
    width: 100%;
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition-smooth);
}

.theme-toggle:hover {
    background-color: var(--bg-card);
    border-color: var(--primary-color);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 80px 0 60px;
    position: relative;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary) 30%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 30px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    outline: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

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

.btn-secondary {
    background-color: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

/* Search and Filters Bar */
.search-filter-section {
    margin-bottom: 40px;
}

.search-box-wrapper {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.search-input-group {
    flex: 2 1 300px;
    display: flex;
    align-items: center;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    gap: 12px;
}

.search-input-group input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    width: 100%;
    font-size: 0.95rem;
}

.search-input-group svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.filter-select {
    flex: 1 1 180px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    cursor: pointer;
    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='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 40px;
}

.filter-select:focus, .search-input-group:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Job Grid & Cards */
.jobs-count {
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.jobs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.job-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.job-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.job-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0;
    transition: var(--transition-smooth);
}

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

.job-card-header {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.company-logo-container {
    width: 60px;
    height: 60px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.company-logo-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.company-logo-placeholder {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.job-card-title-area {
    flex-grow: 1;
}

.job-card-title {
    font-size: 1.35rem;
    margin-bottom: 6px;
    font-weight: 700;
    transition: var(--transition-smooth);
}

.job-card:hover .job-card-title {
    color: var(--primary-color);
}

.job-company-name {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.job-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-item svg {
    flex-shrink: 0;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.badge-full-time {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--color-full-time);
}
.badge-part-time {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--color-part-time);
}
.badge-contract {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--color-contract);
}
.badge-temporary {
    background-color: rgba(236, 72, 153, 0.1);
    color: var(--color-temporary);
}
.badge-intern {
    background-color: rgba(168, 85, 247, 0.1);
    color: var(--color-intern);
}

.badge-mode {
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.job-card-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.job-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.salary-tag {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.salary-tag span {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 40px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.empty-state svg {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
}

/* UPLOAD PAGE FORM */
.card-form-wrapper {
    max-width: 800px;
    margin: 40px auto;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.form-header {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.form-header h2 {
    font-size: 1.8rem;
    margin-bottom: 6px;
}

.form-header p {
    color: var(--text-secondary);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.form-grid-full {
    grid-column: span 2;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-group label span.required {
    color: #ef4444;
    margin-left: 2px;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    font-family: inherit;
    transition: var(--transition-smooth);
}

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

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group select {
    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='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 40px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

/* Notification banner */
.alert-banner {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* JOB DETAIL PAGE */
.job-detail-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 40px;
}

.job-main-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
}

.job-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-md);
}

.sidebar-card h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.detail-header-wrapper {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 30px;
    margin-bottom: 30px;
}

.detail-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.detail-meta-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-meta-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    color: var(--text-secondary);
}

.detail-meta-item strong {
    color: var(--text-primary);
}

.detail-meta-item svg {
    flex-shrink: 0;
    color: var(--text-muted);
}

.job-body {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
    word-break: break-word;
    overflow-wrap: break-word;
}

.job-body * {
    color: inherit;
}

.job-body strong {
    color: var(--text-primary);
}

.job-body h2, .job-body h3, .job-body h4, .job-body h5, .job-body h6 {
    color: var(--text-primary);
    margin: 24px 0 12px;
    font-family: 'Outfit', sans-serif;
}

.job-body p {
    margin-bottom: 16px;
}

.job-body ul, .job-body ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.job-body li {
    margin-bottom: 8px;
}

/* Google Indexing API panel in Sidebar */
.api-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.api-status-indicator {
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    text-align: center;
}

.api-status-pending {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .job-detail-layout {
        grid-template-columns: 1fr;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-grid-full {
        grid-column: span 1;
    }
}

@media (max-width: 600px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    .nav-container {
        height: 70px;
    }
    .nav-links {
        display: none; /* simple hidden for mobile mockup */
    }
    .job-card {
        padding: 20px;
    }
    .job-card-header {
        flex-direction: column;
        gap: 12px;
    }
    .card-form-wrapper {
        padding: 24px;
    }
    
    /* Responsive Buttons & Layout */
    .detail-header-wrapper .btn,
    .sidebar-card .btn,
    .job-card-footer .btn {
        display: flex !important;
        width: 100% !important;
        box-sizing: border-box !important;
        justify-content: center !important;
    }
    .job-card-footer {
        flex-direction: column;
        align-items: stretch !important;
        gap: 16px;
    }
    .job-card-footer .salary-tag {
        text-align: center;
    }
}

/* Sync Status Indicators */
.sync-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-top: 15px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}
.sync-status .dot {
    width: 8px;
    height: 8px;
    background-color: var(--text-muted);
    border-radius: 50%;
    transition: var(--transition-smooth);
}
.sync-status.active .dot {
    background-color: var(--primary-color);
    box-shadow: 0 0 8px var(--primary-color);
    animation: syncPulse 1.5s infinite;
}
.sync-status.success .dot {
    background-color: var(--color-full-time);
    box-shadow: 0 0 8px var(--color-full-time);
}
.sync-status.cooldown .dot {
    background-color: var(--text-muted);
}
@keyframes syncPulse {
    0% { transform: scale(0.95); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
    100% { transform: scale(0.95); opacity: 1; }
}

/* Full Width Button Helper */
.btn-full {
    display: flex !important;
    width: 100% !important;
    justify-content: center !important;
}

/* Tablet & Mobile Button Overrides */
@media (max-width: 768px) {
    .detail-header-wrapper .btn,
    .sidebar-card .btn,
    .job-card-footer .btn {
        display: flex !important;
        width: 100% !important;
        box-sizing: border-box !important;
        justify-content: center !important;
    }
}
