/* --- MODERN GLASSMORPHISM DESIGN SYSTEM --- */
:root {
    --bg-base: #f4f6f8;
    --bg-surface: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-highlight: rgba(0, 0, 0, 0.03);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --accent-primary: #3b82f6;
    --accent-hover: #2563eb;
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-full: 9999px;
    
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    --shadow-neon: 0 0 15px rgba(59, 130, 246, 0.3);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6, .brand {
    font-family: 'Outfit', sans-serif;
}

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

/* Abstract Background Shapes */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.5;
    animation: float 20s infinite ease-in-out alternate;
}

.shape-1 {
    width: 40vw; height: 40vw;
    background: radial-gradient(circle, #3b82f688 0%, transparent 70%);
    top: -10vw; left: -10vw;
}

.shape-2 {
    width: 35vw; height: 35vw;
    background: radial-gradient(circle, #8b5cf688 0%, transparent 70%);
    bottom: -10vw; right: -5vw;
    animation-delay: -5s;
}

.shape-3 {
    width: 30vw; height: 30vw;
    background: radial-gradient(circle, #10b98155 0%, transparent 70%);
    top: 40%; left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 5%) scale(1.1); }
}

/* Utilities */
.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.text-gray { color: var(--text-secondary); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-6 { margin-top: 2.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-6 { margin-bottom: 2.5rem; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.p-0 { padding: 0 !important; }
.p-4 { padding: 1.5rem; }
.pt-1 { padding-top: 0.25rem; }
.w-full, .full-width { width: 100%; }
.hidden { display: none !important; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.flex { display: flex; }
.gap-3 { gap: 1rem; }
.uppercase { text-transform: uppercase; }
.tracking-wider { letter-spacing: 0.05em; }

/* Navigation */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.brand {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
}

.brand-icon {
    background: var(--accent-gradient);
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    display: flex; justify-content: center; align-items: center;
    font-size: 1.1rem;
    box-shadow: var(--shadow-neon);
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: var(--radius-sm);
    position: relative;
}

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

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

.nav-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1rem; left: 0; width: 100%;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 3px 3px 0 0;
}

.user-greeting {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--text-muted);
    display: flex; justify-content: center; align-items: center;
    font-weight: 700;
    font-family: 'Outfit';
}

/* Glass Buttons */
.glass-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.glass-btn.lg {
    padding: 0.8rem 1.5rem;
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.btn-outline {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    backdrop-filter: blur(4px);
}

.btn-outline:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.btn-secondary:hover {
    background: rgba(59, 130, 246, 0.2);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* Main Layout */
.main-layout {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 2rem;
    position: relative;
    z-index: 10;
}

.page-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.page-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero Section */
.hero-section {
    max-width: 800px;
    margin: 0 auto 4rem auto;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* Glass Panels & Inputs */
.glass-panel {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-glass);
}

.search-bar {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
}

.search-bar i {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-right: 0.75rem;
}

.glass-input {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.3s;
    width: 100%;
}

.glass-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.search-bar .glass-input {
    border: none;
    background: transparent;
    padding: 0.5rem;
    font-size: 1.1rem;
}

.search-bar .glass-input:focus {
    box-shadow: none;
}

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

.job-card {
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: slideUp 0.6s backwards;
}

.job-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1), 0 0 15px rgba(59, 130, 246, 0.2);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.brand-cluster {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.card-logo-img {
    width: 48px; height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: white;
}

.card-logo-fallback {
    width: 48px; height: 48px;
    border-radius: var(--radius-sm);
    display: flex; justify-content: center; align-items: center;
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'Outfit';
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.brand-cluster h4 {
    font-size: 1.1rem;
    margin-bottom: 0.1rem;
}

.post-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.badge {
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-tech { background: rgba(59, 130, 246, 0.15); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-success { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.3); }
.rounded-full { border-radius: var(--radius-full); }

.card-body {
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.role-title {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.role-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.meta-item i { width: 20px; text-align: center; color: var(--text-muted); }
.emphasis { color: #6ee7b7; font-weight: 500; }

.card-footer {
    display: flex;
    gap: 1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
}

.empty-icon {
    font-size: 4rem;
    color: var(--glass-border);
    margin-bottom: 1.5rem;
}

.empty-state h3 { font-size: 1.8rem; margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-secondary); max-width: 400px; margin: 0 auto; }

/* Dashboard Tables */
.dash-title { font-size: 2.5rem; margin-bottom: 0.5rem; }
.dash-subtitle { color: var(--text-secondary); }

.table-wrapper {
    overflow-x: auto;
}

.glass-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.glass-table th {
    padding: 1.25rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.05);
}

.glass-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.95rem;
}

.glass-table tr { transition: background 0.3s; }
.glass-table tr:hover { background: var(--glass-highlight); }
.glass-table tr:last-child td { border-bottom: none; }

.action-btn { background: none; border: none; font-size: 1.1rem; cursor: pointer; transition: 0.3s; }
.text-danger { color: #f87171; }
.text-danger:hover { color: #ef4444; filter: drop-shadow(0 0 5px rgba(239, 68, 68, 0.5)); }

/* Modals */
.modal {
    position: fixed; inset: 0; z-index: 1000;
    display: none; align-items: center; justify-content: center;
    padding: 1rem;
}

.modal.active { display: flex; }
.modal.active .modal-backdrop { opacity: 1; }
.modal.active .modal-container { transform: scale(1); opacity: 1; }

.modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(5px);
    opacity: 0; transition: 0.3s;
}

.modal-container {
    position: relative; z-index: 1001;
    width: 100%; max-width: 450px;
    transform: scale(0.95); opacity: 0;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-height: 90vh;
}

.modal-container.lg { max-width: 700px; }
.scroll-body { overflow-y: auto; overflow-x: hidden;}

.modal-header {
    padding: 1.5rem; border-bottom: 1px solid var(--glass-border);
    display: flex; justify-content: space-between; align-items: center;
}
.shrink-header { padding: 1rem 1.5rem; }

.modal-header h3 { font-size: 1.5rem; }

.close-btn {
    background: rgba(0,0,0,0.05); border: none; color: var(--text-primary);
    width: 30px; height: 30px; border-radius: 50%;
    cursor: pointer; transition: 0.3s;
    display: flex; justify-content: center; align-items: center;
}
.close-btn:hover { background: rgba(0,0,0,0.1); }

.modal-body { padding: 1.5rem; }

/* Forms */
.form-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.5rem;
}
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.span-2 { grid-column: span 2; }

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

.input-icon { position: relative; }
.input-icon i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.icon-pl { padding-left: 2.5rem !important; }

textarea.glass-input { resize: vertical; min-height: 100px;}

.file-upload-wrapper {
    position: relative;
    background: rgba(255, 255, 255, 0.5); border: 1px dashed var(--glass-border);
    border-radius: var(--radius-sm); padding: 0.5rem;
    transition: 0.3s;
}
.file-upload-wrapper:hover { border-color: var(--accent-primary); background: rgba(255, 255, 255, 0.8);}
.glass-file { width: 100%; color: var(--text-secondary); }

/* Details Modal */
.detail-modal { padding: 0; overflow: hidden; background: var(--bg-base); max-width: 800px;}
.detail-close { position: absolute; top: 1rem; right: 1rem; z-index: 1002; background: rgba(255,255,255,0.8); color: var(--text-primary); }
.detail-hero { height: 200px; position: relative; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, var(--bg-base), transparent); }
.detail-hero.abstract { display: flex; justify-content: center; align-items: center; }
.hero-initial { font-size: 5rem; font-weight: 800; opacity: 0.5; }

.detail-body { transform: translateY(-30px); position: relative; z-index: 10;}
.floating-brand { margin-bottom: -5px; }
.glass-tag {
    background: rgba(0,0,0,0.03); padding: 0.3rem 0.8rem; border-radius: var(--radius-full);
    border: 1px solid var(--glass-border); color: var(--text-primary);
}

.prose-dark {
    color: var(--text-secondary);
}

/* Tabs */
.tab-system { display: flex; border-bottom: 1px solid var(--glass-border); }
.tab-btn {
    flex: 1; padding: 1rem; background: transparent; border: none;
    color: var(--text-muted); font-weight: 600; cursor: pointer; transition: 0.3s;
    border-bottom: 2px solid transparent; text-align: center; font-size: 1rem;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--accent-primary); border-bottom-color: var(--accent-primary); }

/* Toast */
.glass-toast {
    position: fixed; bottom: 2rem; right: 2rem; z-index: 2000;
    background: var(--bg-surface); backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border); border-radius: var(--radius-md);
    padding: 1rem 1.5rem; display: flex; align-items: center; gap: 1rem;
    box-shadow: var(--shadow-glass);
    transform: translateY(100px); opacity: 0; transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.glass-toast.visible { transform: translateY(0); opacity: 1; }
.toast-icon { color: #10b981; font-size: 1.2rem; }

/* Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; } /* Could add hamburger */
    .hero-title { font-size: 2.5rem; }
    .job-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .span-2 { grid-column: span 1; }
}

/* LuckyJob Checkbox */
.lucky-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: #4b5563;
    position: relative;
}

.lucky-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.lucky-checkbox .checkmark {
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 2px solid #d1d5db;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.lucky-checkbox:hover input ~ .checkmark {
    border-color: #9ca3af;
}

.lucky-checkbox input:checked ~ .checkmark {
    background-color: #1a1d1f;
    border-color: #1a1d1f;
}

.lucky-checkbox .checkmark:after {
    content: "";
    display: none;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.lucky-checkbox input:checked ~ .checkmark:after {
    display: block;
}
