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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.hidden {
    display: none !important;
}

/* Auth Container */
#auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-box {
    background: white;
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #667eea;
    font-size: 28px;
}

.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    transition: color 0.3s;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.auth-box input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.auth-box input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    padding: 10px 20px;
    background: #f0f0f0;
    color: #333;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

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

.message {
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
    color: #e74c3c;
}

/* App Container */
#app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: white;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header h1 {
    color: #667eea;
    font-size: 24px;
}

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

#username-display {
    font-weight: 600;
    color: #333;
}

.controls {
    padding: 20px 40px;
    background: rgba(255, 255, 255, 0.9);
}

#add-application-btn {
    width: auto;
    padding: 12px 24px;
}

/* Kanban Board */
.kanban-board {
    display: flex;
    gap: 20px;
    padding: 20px 40px;
    overflow-x: auto;
    flex: 1;
}

.column {
    flex: 0 0 280px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 15px;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.column-title {
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

.column-count {
    background: #667eea;
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}

.cards-container {
    flex: 1;
    overflow-y: auto;
    min-height: 100px;
}

.card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: move;
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid #667eea;
}

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

.card.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

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

.card-company {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    flex: 1;
}

.card-actions {
    display: flex;
    gap: 5px;
}

.card-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #666;
    font-size: 14px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.card-btn:hover {
    background: #f0f0f0;
    color: #667eea;
}

.card-btn.delete:hover {
    color: #e74c3c;
}

.card-body {
    margin-bottom: 10px;
}

.card-field {
    margin-bottom: 8px;
    font-size: 14px;
    color: #555;
}

.card-field strong {
    color: #333;
    margin-right: 5px;
}

.card-comments {
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.card-days {
    font-weight: 600;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

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

#modal-title {
    margin-bottom: 20px;
    color: #667eea;
}

/* Increased spacing for confirmation modal headings */
#logout-modal .modal-content h2,
#delete-modal .modal-content h2 {
    margin-bottom: 25px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

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

.form-actions button {
    width: auto;
    padding: 10px 20px;
}

/* Drag and drop visual feedback */
.cards-container.drag-over {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .kanban-board {
        padding: 10px;
    }

    .column {
        flex: 0 0 250px;
        min-height: 400px;
    }

    header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
    }
}
