/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #0ea5e9;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--white);
}

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

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.25rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-100);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    text-decoration: none;
}

.logo-icon {
    font-size: 1.75rem;
}

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

.nav-links a {
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

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

/* Hero Section */
.hero {
    padding: 140px 0 80px;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    margin-bottom: 24px;
    color: var(--gray-900);
}

.hero-content .highlight {
    color: var(--primary);
    position: relative;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-600);
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Form Card */
.form-card {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-100);
}

.form-card h2 {
    margin-bottom: 8px;
    color: var(--gray-900);
}

.form-card > p {
    color: var(--gray-500);
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-700);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    transition: all 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

.form-hint {
    display: block;
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 8px;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--gray-500);
}

.form-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* How It Works Section */
.how-it-works {
    padding: 100px 0;
    background: var(--white);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    color: var(--gray-900);
}

.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.step {
    text-align: center;
    padding: 30px;
    position: relative;
}

.step-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.step-number {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.step h3 {
    margin-bottom: 12px;
    color: var(--gray-900);
}

.step p {
    color: var(--gray-600);
    font-size: 0.95rem;
}

/* Benefits Section */
.benefits {
    padding: 100px 0;
    background: var(--gray-50);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.benefit-card {
    background: var(--white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

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

.benefit-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.benefit-card h3 {
    margin-bottom: 12px;
    color: var(--gray-900);
}

.benefit-card p {
    color: var(--gray-600);
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand .logo-icon,
.footer-brand .logo-text {
    color: var(--white);
}

.footer-brand p {
    margin-top: 16px;
    color: var(--gray-400);
}

.footer-links h4 {
    color: var(--white);
    margin-bottom: 16px;
}

.footer-links a {
    display: block;
    color: var(--gray-400);
    text-decoration: none;
    margin-bottom: 8px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid var(--gray-700);
    padding-top: 30px;
    text-align: center;
    color: var(--gray-500);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--white);
    padding: 48px;
    border-radius: 16px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    box-shadow: var(--shadow-xl);
}

.modal-icon {
    font-size: 4rem;
    margin-bottom: 24px;
}

.modal-content h2 {
    margin-bottom: 16px;
    color: var(--gray-900);
}

.modal-content p {
    color: var(--gray-600);
    margin-bottom: 12px;
}

.modal-content .btn {
    margin-top: 24px;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .form-card {
        padding: 24px;
    }
}

/* Portal Specific Styles */
.portal-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 20px 0;
}

.portal-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.portal-main {
    padding: 40px 0;
    min-height: calc(100vh - 80px);
    background: var(--gray-50);
}

.portal-title {
    margin-bottom: 30px;
}

.portal-title h1 {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.portal-title p {
    color: var(--gray-500);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--white);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.stat-card .stat-label {
    display: block;
    margin-bottom: 8px;
}

.stat-card .stat-number {
    font-size: 2.5rem;
}

/* Applications Table */
.applications-section {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.section-header {
    padding: 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h2 {
    font-size: 1.25rem;
}

.applications-table {
    width: 100%;
    border-collapse: collapse;
}

.applications-table th,
.applications-table td {
    padding: 16px 24px;
    text-align: left;
    border-bottom: 1px solid var(--gray-100);
}

.applications-table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.applications-table tr:hover {
    background: var(--gray-50);
}

.job-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.job-title {
    font-weight: 600;
    color: var(--gray-900);
}

.job-company {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.score-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
}

.score-high {
    background: #dcfce7;
    color: #166534;
}

.score-medium {
    background: #fef3c7;
    color: #92400e;
}

.score-low {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-ready {
    background: #dbeafe;
    color: #1e40af;
}

.status-applied {
    background: #dcfce7;
    color: #166534;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.action-links {
    display: flex;
    gap: 12px;
}

.action-links a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.action-links a:hover {
    text-decoration: underline;
}

/* Login Form */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-50);
}

.login-card {
    background: var(--white);
    padding: 48px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
}

.login-card .logo {
    justify-content: center;
    margin-bottom: 32px;
}

.login-card h2 {
    text-align: center;
    margin-bottom: 8px;
}

.login-card > p {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 32px;
}

/* Empty State */
.empty-state {
    padding: 60px;
    text-align: center;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.empty-state h3 {
    margin-bottom: 12px;
    color: var(--gray-700);
}

.empty-state p {
    color: var(--gray-500);
    margin-bottom: 24px;
}

/* Loading State */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .applications-table {
        display: block;
        overflow-x: auto;
    }
}
