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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

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

/* Navigation */
.navbar {
    background: #2563eb;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.nav-brand h1 {
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s;
}

.nav-menu a:hover {
    opacity: 0.8;
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Alerts */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border-left: 4px solid;
}

.alert-success {
    background: #d1fae5;
    border-color: #10b981;
    color: #065f46;
}

.alert-error {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

.alert-warning {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.alert-info {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e3a8a;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #64748b;
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-link {
    background: transparent;
    color: #2563eb;
    padding: 0.5rem 1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    color: #2563eb;
}

.stat-label {
    color: #64748b;
    margin-top: 0.5rem;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.action-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.action-card h3 {
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.how-it-works {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
}

.how-it-works ol {
    margin-left: 2rem;
    margin-top: 1rem;
}

.how-it-works li {
    margin: 1rem 0;
}

/* Upload Page */
.upload-form {
    max-width: 600px;
    margin: 2rem auto;
}

.file-upload-area {
    position: relative;
    margin: 2rem 0;
}

.file-upload-area input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-area label {
    display: block;
    background: white;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.file-upload-area label:hover {
    border-color: #2563eb;
    background: #f8fafc;
}

.upload-icon {
    font-size: 3rem;
}

.upload-text {
    font-size: 1.25rem;
    margin: 1rem 0;
    font-weight: 500;
}

.upload-hint {
    color: #64748b;
    font-size: 0.875rem;
}

/* Profile Page */
.profile-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.profile-section h2 {
    color: #2563eb;
    margin-bottom: 1rem;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.skill-tag {
    background: #dbeafe;
    color: #1e40af;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

.experience-item, .education-item {
    margin: 1.5rem 0;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.experience-item:last-child, .education-item:last-child {
    border-bottom: none;
}

.duration {
    color: #64748b;
    font-style: italic;
}

/* Jobs List */
.filters {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.filter-form {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group select {
    padding: 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1rem;
}

.jobs-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.job-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.job-header h3 {
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.company {
    color: #64748b;
}

.match-score {
    font-size: 1.5rem;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    min-width: 80px;
    text-align: center;
}

.score-9, .score-10 { background: #d1fae5; color: #065f46; }
.score-7, .score-8 { background: #a7f3d0; color: #064e3b; }
.score-5, .score-6 { background: #fef3c7; color: #92400e; }
.score-0, .score-1, .score-2, .score-3, .score-4 { background: #fee2e2; color: #991b1b; }

.job-meta {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.source-badge, .status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.source-badge {
    background: #f1f5f9;
    color: #475569;
}

.status-badge {
    background: #e0e7ff;
    color: #3730a3;
}

.status-new { background: #dbeafe; color: #1e40af; }
.status-reviewed { background: #fef3c7; color: #92400e; }
.status-applied { background: #d1fae5; color: #065f46; }

.salary {
    color: #059669;
    font-weight: 500;
}

.job-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Job Detail */
.job-detail-page {
    background: white;
    padding: 2rem;
    border-radius: 12px;
}

.job-score-card {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.score-display {
    text-align: center;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.score-number {
    font-size: 4rem;
    font-weight: bold;
}

.score-label {
    font-size: 1.25rem;
    margin-top: 0.5rem;
}

.match-analysis h3 {
    margin-bottom: 1rem;
}

.pros, .cons {
    margin: 1.5rem 0;
}

.pros ul, .cons ul {
    margin-left: 2rem;
    margin-top: 0.5rem;
}

.recommendation {
    background: #2563eb;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    text-align: center;
    font-size: 1.125rem;
}

.description {
    line-height: 1.8;
    margin: 1rem 0;
}

.job-actions-panel {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

/* Application Review */
.review-notice {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 1rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.application-section {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.cover-letter-editor {
    width: 100%;
    padding: 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
}

.custom-section {
    margin: 1.5rem 0;
}

.keyword-tag {
    background: #fef3c7;
    color: #92400e;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    margin-right: 0.5rem;
}

.screening-qa {
    margin: 1.5rem 0;
    padding: 1rem;
    background: white;
    border-radius: 8px;
}

.question {
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.approval-actions {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    padding: 2rem 0;
    border-top: 1px solid #e2e8f0;
}

.next-steps {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
}

.next-steps ol {
    margin-left: 2rem;
    margin-top: 1rem;
}

/* Search Page */
.search-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 800px;
    margin: 2rem auto;
}

.form-group {
    margin: 1.5rem 0;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
}

.form-group small {
    color: #64748b;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.search-info {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
}

/* Footer */
footer {
    background: #1e293b;
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .job-header {
        flex-direction: column;
    }
    
    .match-score {
        align-self: flex-start;
    }
    
    .approval-actions {
        flex-direction: column;
    }
}
