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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #64748b;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg: #f1f5f9;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.hidden {
    display: none !important;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.login-box {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-box h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.login-subtitle {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.login-hint {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9375rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

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

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

/* Dashboard */
.dashboard {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: var(--card-bg);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.user-email {
    color: var(--text-light);
    font-size: 0.875rem;
    padding-left: 1rem;
    border-left: 1px solid var(--border);
}

.header-right {
    display: flex;
    gap: 0.75rem;
}

/* Board */
.board-container {
    flex: 1;
    overflow-x: auto;
    padding: 1.5rem;
}

.board {
    display: flex;
    gap: 1rem;
    min-width: max-content;
    height: 100%;
}

.column {
    background: var(--bg);
    border-radius: 12px;
    width: 300px;
    min-width: 300px;
    max-height: calc(100vh - 140px);
    display: flex;
    flex-direction: column;
}

.column-header {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid transparent;
}

.column-title {
    font-weight: 600;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.column-count {
    background: var(--card-bg);
    color: var(--text-light);
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

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

.column-content.drag-over {
    background: rgba(99, 102, 241, 0.05);
    border-radius: 8px;
}

/* Column Colors */
.column[data-column="cold-outreach"] .column-header { border-bottom-color: #94a3b8; }
.column[data-column="connection-sent"] .column-header { border-bottom-color: #60a5fa; }
.column[data-column="warm-lead"] .column-header { border-bottom-color: #fbbf24; }
.column[data-column="discovery-scheduled"] .column-header { border-bottom-color: #a78bfa; }
.column[data-column="discovery-done"] .column-header { border-bottom-color: #c084fc; }
.column[data-column="proposal-sent"] .column-header { border-bottom-color: #f472b6; }
.column[data-column="negotiating"] .column-header { border-bottom-color: #fb923c; }
.column[data-column="closed-won"] .column-header { border-bottom-color: #22c55e; }
.column[data-column="closed-lost"] .column-header { border-bottom-color: #ef4444; }

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 1rem;
    box-shadow: var(--shadow);
    cursor: grab;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid transparent;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.card.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

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

.card-title {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text);
    line-height: 1.3;
}

.card-funding {
    font-size: 0.75rem;
    color: var(--success);
    font-weight: 600;
    background: rgba(34, 197, 94, 0.1);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
    margin-left: 0.5rem;
}

.card-contact {
    font-size: 0.8125rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.card-activity {
    font-size: 0.75rem;
    color: var(--text-light);
    padding: 0.375rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.5rem;
}

.card-notes {
    font-size: 0.8125rem;
    color: var(--text);
    line-height: 1.4;
}

.card-tag {
    display: inline-block;
    font-size: 0.6875rem;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-weight: 500;
    margin-top: 0.5rem;
}

.tag-noshow { background: #fee2e2; color: #991b1b; }
.tag-today { background: #dbeafe; color: #1e40af; }
.tag-followup { background: #fef3c7; color: #92400e; }
.tag-deck { background: #d1fae5; color: #065f46; }

/* 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: 1000;
    padding: 1rem;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

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

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

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
}

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

.modal form {
    padding: 1.5rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .header-left {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .user-email {
        border-left: none;
        padding-left: 0;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .column {
        width: 280px;
        min-width: 280px;
    }
}
