/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

/* App container */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #3498db;
}

.app-header h1 {
    color: #2c3e50;
    font-size: 28px;
    display: flex;
    align-items: center;
}

.app-header h1::before {
    content: "📋";
    margin-right: 10px;
}

/* Buttons */
.btn-primary {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.btn-danger:hover {
    background-color: #c0392b;
}

/* Kanban Board */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.column {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    min-height: 500px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.column:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.column[data-status="todo"] {
    border-top: 4px solid #3498db;
}

.column[data-status="inprogress"] {
    border-top: 4px solid #f39c12;
}

.column[data-status="done"] {
    border-top: 4px solid #27ae60;
}

.column-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ecf0f1;
    color: #2c3e50;
    font-size: 20px;
    text-align: center;
    font-weight: 600;
}

.cards-container {
    min-height: 400px;
    position: relative;
}

/* Lead Cards */
.lead-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: move;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    position: relative;
    overflow: hidden;
}

.lead-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: #3498db;
}

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

.lead-card.dragging {
    opacity: 0.5;
    transform: rotate(3deg);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.lead-name {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 8px;
    color: #2c3e50;
}

.lead-detail {
    margin-bottom: 5px;
    font-size: 14px;
    color: #7f8c8d;
}

.lead-detail strong {
    color: #34495e;
}

.card-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
    gap: 10px;
}

.card-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 5px;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.edit-btn {
    color: #3498db;
}

.edit-btn:hover {
    background-color: #e3f2fd;
}

.delete-btn {
    color: #e74c3c;
}

.delete-btn:hover {
    background-color: #ffebee;
}

/* Drag and Drop */
.drag-over {
    background-color: #f0f8ff;
    border: 2px dashed #3498db;
    border-radius: 8px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: modalopen 0.3s;
}

@keyframes modalopen {
    from {opacity: 0; transform: translateY(-20px);}
    to {opacity: 1; transform: translateY(0);}
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    color: #2c3e50;
}

.close-btn {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close-btn:hover {
    color: #333;
}

/* Form Styles */
#lead-form {
    padding: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #2c3e50;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Delete Modal */
#delete-modal .modal-content {
    text-align: center;
    padding: 20px;
}

#delete-modal p {
    margin: 20px 0;
    font-size: 16px;
    color: #555;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .kanban-board {
        grid-template-columns: 1fr;
    }
    
    .column {
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .app-header h1 {
        font-size: 24px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

@media (max-width: 480px) {
    .app-container {
        padding: 10px;
    }
    
    .app-header {
        padding: 15px;
    }
    
    .column {
        padding: 15px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
    }
}