:root {
    --bg-color: #F8FAFC;
    --card-bg: #FFFFFF;
    --text-primary: #0F172A;
    --text-secondary: #64748B;
    --border-color: #E2E8F0;
    --primary-color: #2563EB;
    --primary-hover: #1D4ED8;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header */
.app-header {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

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

h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #0F172A, #3B82F6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 8px rgba(37, 99, 235, 0.3);
}

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

.btn-secondary:hover {
    background-color: #F1F5F9;
    border-color: #CBD5E1;
}

/* Main Layout */
.app-main {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Funnel Section */
.funnel-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.funnel-section h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.funnel-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.funnel-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: #F1F5F9;
    border-radius: 12px;
    position: relative;
    border: 1px solid var(--border-color);
}

.funnel-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0; 
    height: 0; 
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 10px solid #CBD5E1;
    z-index: 10;
}

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

.funnel-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Kanban Board */
.kanban-board {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    align-items: flex-start;
}

.kanban-column {
    flex: 0 0 280px;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 300px);
    min-height: 400px;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.column-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.count {
    background: #E2E8F0;
    color: var(--text-primary);
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.column-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-right: 0.5rem;
}

.column-content::-webkit-scrollbar {
    width: 6px;
}

.column-content::-webkit-scrollbar-track {
    background: transparent;
}

.column-content::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 10px;
}

/* Kanban Card */
.kanban-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    cursor: grab;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
}

.kanban-card:active {
    cursor: grabbing;
}

.kanban-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: #CBD5E1;
}

.kanban-card.dragging {
    opacity: 0.5;
    box-shadow: var(--shadow-lg);
}

.card-company {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.card-role {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.card-link {
    font-size: 0.75rem;
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.card-link:hover {
    text-decoration: underline;
}

.card-delete {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
    border: none;
    color: #94A3B8;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    padding: 0.25rem;
    border-radius: 4px;
    transition: var(--transition);
}

.card-delete:hover {
    color: #EF4444;
    background: #FEE2E2;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

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

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

.close-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

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

.modal-body {
    padding: 1.5rem;
}

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

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

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

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

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

/* Color Coding for Pipelines */

/* Roles Found (Slate/Gray) */
.kanban-column[data-column="found"] {
    border-top: 4px solid #94A3B8;
}
.funnel-item[data-stage="found"] {
    background-color: #F1F5F9;
    border-color: #CBD5E1;
}
.funnel-item[data-stage="found"] .funnel-count {
    color: #64748B;
}

/* Referral Requested (Purple) */
.kanban-column[data-column="referral"] {
    border-top: 4px solid #A855F7;
}
.funnel-item[data-stage="referral"] {
    background-color: #F3E8FF;
    border-color: #D8B4FE;
}
.funnel-item[data-stage="referral"] .funnel-count {
    color: #9333EA;
}

/* Applied (Yellow/Orange) */
.kanban-column[data-column="applied"] {
    border-top: 4px solid #F59E0B;
}
.funnel-item[data-stage="applied"] {
    background-color: #FEF3C7;
    border-color: #FCD34D;
}
.funnel-item[data-stage="applied"] .funnel-count {
    color: #D97706;
}

/* Interviewing (Blue) */
.kanban-column[data-column="interviewing"] {
    border-top: 4px solid #3B82F6;
}
.funnel-item[data-stage="interviewing"] {
    background-color: #DBEAFE;
    border-color: #93C5FD;
}
.funnel-item[data-stage="interviewing"] .funnel-count {
    color: #2563EB;
}

/* Rejected (Red) */
.kanban-column[data-column="rejected"] {
    border-top: 4px solid #EF4444;
}
.funnel-item[data-stage="rejected"] {
    background-color: #FEE2E2;
    border-color: #FCA5A5;
}
.funnel-item[data-stage="rejected"] .funnel-count {
    color: #DC2626;
}

/* Todo Section */
.todo-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.todo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.todo-header h2 {
    font-size: 1.2rem;
    color: var(--text-primary);
}

.todo-form {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    min-width: 300px;
}

.todo-form input {
    flex: 1;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.todo-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.todo-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.todo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #F8FAFC;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
}

.todo-item:hover {
    background: #F1F5F9;
}

.todo-item.completed .todo-text {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.todo-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.todo-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.todo-text {
    font-size: 0.95rem;
    color: var(--text-primary);
    cursor: pointer;
    flex: 1;
}

.todo-delete {
    background: transparent;
    border: none;
    color: #94A3B8;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    padding: 0.25rem;
    border-radius: 4px;
    transition: var(--transition);
}

.todo-delete:hover {
    color: #EF4444;
    background: #FEE2E2;
}
