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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
    background-attachment: fixed;
    line-height: 1.6;
    color: #0d3b66;
    min-height: 100vh;
}

.container {
    padding: 20px;
    max-width: 100%;
    overflow-x: auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px 24px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(13, 59, 102, 0.1), 0 1px 2px rgba(13, 59, 102, 0.08);
    transition: box-shadow 0.3s ease;
    border-left: 4px solid #0d3b66;
}

header:hover {
    box-shadow: 0 4px 12px rgba(13, 59, 102, 0.15), 0 2px 4px rgba(13, 59, 102, 0.1);
}

header h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #0d3b66 0%, #1e88e5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.statistics-panel {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(13, 59, 102, 0.1), 0 1px 2px rgba(13, 59, 102, 0.08);
    flex-wrap: wrap;
}

.stat-item {
    flex: 1;
    min-width: 160px;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f5f9 100%);
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0d3b66 0%, #1e88e5 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-item:hover::before {
    transform: scaleX(1);
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(13, 59, 102, 0.15);
    border-color: #1e88e5;
}

.stat-item h4 {
    margin: 0 0 12px 0;
    color: #0d3b66;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.stat-tooltip {
    cursor: help;
    font-size: 12px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.stat-tooltip:hover {
    opacity: 1;
}

.stat-item span {
    font-size: 32px;
    font-weight: 800;
    color: #0d3b66;
    display: block;
    line-height: 1;
}

.add-card-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #1e88e5 0%, #1976d2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.add-card-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 136, 229, 0.4);
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
}

.add-card-btn:active {
    transform: translateY(0);
}

.filter-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #0d3b66 0%, #0a2f52 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 10px rgba(13, 59, 102, 0.3);
    letter-spacing: 0.3px;
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(13, 59, 102, 0.4);
    background: linear-gradient(135deg, #0a2f52 0%, #08253d 100%);
}

.kanban-board {
    display: flex;
    gap: 20px;
    padding: 20px;
    height: calc(100vh - 120px);
    overflow-x: auto;
    overflow-y: hidden;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    scroll-behavior: smooth;
    align-items: flex-start;
    white-space: nowrap;
}

.column {
    background: #ffffff;
    border-radius: 12px;
    min-width: 320px;
    width: 320px;
    padding: 16px;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    height: fit-content;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(13, 59, 102, 0.1), 0 1px 2px rgba(13, 59, 102, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.column:hover {
    box-shadow: 0 4px 16px rgba(13, 59, 102, 0.15);
    border-color: #cbd5e0;
}

.kanban-board.dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.kanban-board::-webkit-scrollbar {
    height: 10px;
}

.kanban-board::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.kanban-board::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #0d3b66 0%, #1e88e5 100%);
    border-radius: 10px;
}

.kanban-board::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #1e88e5 0%, #1976d2 100%);
}

.column h2 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
    padding: 12px;
    color: #0d3b66;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f5f9 100%);
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.cards-container {
    min-height: 50px;
    max-height: calc(100vh - 240px);
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-wrap: nowrap;
    padding: 4px;
    flex-grow: 1;
    padding-right: 5px;
}

.cards-container.drag-over {
    background-color: rgba(30, 136, 229, 0.05);
    border-radius: 8px;
}

.cards-container::-webkit-scrollbar {
    width: 6px;
}

.cards-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0d3b66 0%, #1e88e5 100%);
    border-radius: 3px;
}

.cards-container::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 3px;
}

.card {
    background: #ffffff;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(13, 59, 102, 0.12);
    cursor: grab;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 80px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-wrap: nowrap;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #0d3b66 0%, #1e88e5 100%);
    border-radius: 10px 0 0 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover::before {
    opacity: 1;
}

.column .cards-container {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 6px;
}

.card select {
    width: 100%;
    margin-top: 10px;
    display: block;
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    color: #0d3b66;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.card select:hover {
    border-color: #1e88e5;
    background: #f8f9fa;
}

.card select:focus {
    outline: none;
    border-color: #1e88e5;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(13, 59, 102, 0.15);
    border-color: #cbd5e0;
}

.card h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #0d3b66;
    line-height: 1.4;
}

.card-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
}

.card-details > div {
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.5;
}

.card-details a {
    color: #1e88e5;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.card-details a:hover {
    color: #1976d2;
    text-decoration: underline;
}

.card .notes {
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card .time {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 6px;
    border-top: 1px solid #f1f5f9;
    padding-top: 6px;
}

.creation-time, .first-contacted, .closed-at {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid #e2e8f0;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    background-color: rgba(13, 59, 102, 0.5);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-height: 85vh;
    width: 560px;
    max-width: 90%;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(13, 59, 102, 0.3);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.modal-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, #0d3b66 0%, #1e88e5 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: white;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.3px;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0d3b66 0%, #1e88e5 100%);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.modal-footer {
    position: sticky;
    bottom: 0;
    background: #f8f9fa;
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    border-radius: 0 0 16px 16px;
}

.delete-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(220, 53, 69, 0.3);
}

.delete-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(220, 53, 69, 0.4);
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
}

.save-btn {
    background: linear-gradient(135deg, #1e88e5 0%, #1976d2 100%);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(30, 136, 229, 0.3);
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(30, 136, 229, 0.4);
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
}

.close, .close-filter {
    color: white;
    cursor: pointer;
    font-size: 28px;
    font-weight: 300;
    transition: all 0.2s ease;
    line-height: 1;
}

.close:hover, .close-filter:hover {
    transform: rotate(90deg);
    opacity: 0.8;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #0d3b66;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    color: #0d3b66;
    background: #ffffff;
}

.form-group input:hover,
.form-group textarea:hover {
    border-color: #cbd5e0;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1e88e5;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
    background: #fafbfc;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
    font-family: inherit;
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 12px;
    font-style: italic;
}

/* Dragging styles */
.card.dragging {
    opacity: 0.5;
    transform: rotate(3deg) scale(1.02);
    z-index: 1000;
    position: relative;
    cursor: grabbing;
    box-shadow: 0 10px 30px rgba(13, 59, 102, 0.25);
}

.column.drag-over {
    background-color: rgba(30, 136, 229, 0.05);
}

.tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #e2e8f0;
}

.tab-btn {
    flex: 1;
    padding: 14px;
    cursor: pointer;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-weight: 600;
    font-size: 14px;
    color: #64748b;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tab-btn:hover {
    color: #0d3b66;
    background: rgba(30, 136, 229, 0.05);
}

.tab-btn.active {
    border-bottom-color: #1e88e5;
    color: #1e88e5;
    background: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.due-date {
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    transition: all 0.2s ease;
    border: 1px solid;
}

.due-green {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-color: #b1dfbb;
}

.due-orange {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border-color: #ffeaa7;
}

.due-red {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-color: #f5c6cb;
}

/* Container for search, filter, and add button */
.filters {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(13, 59, 102, 0.1), 0 1px 2px rgba(13, 59, 102, 0.08);
    border: 1px solid #e2e8f0;
}

/* Search input */
.filters input[type="text"] {
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    width: 280px;
    transition: all 0.3s ease;
    font-family: inherit;
    color: #0d3b66;
    background: #ffffff;
}

.filters input[type="text"]:hover {
    border-color: #cbd5e0;
}

.filters input[type="text"]:focus {
    border-color: #1e88e5;
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
    background: #fafbfc;
}

/* Sort / filter select */
.filters select {
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    background-color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    color: #0d3b66;
    font-weight: 500;
}

.filters select:hover {
    border-color: #cbd5e0;
}

.filters select:focus {
    border-color: #1e88e5;
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
    background: #fafbfc;
}

/* Column Filter Modal Styles */
.filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-options label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: #0d3b66;
    border: 2px solid transparent;
    background: #f8f9fa;
}

.filter-options label:hover {
    background: #e2e8f0;
    border-color: #1e88e5;
}

.filter-options input[type="checkbox"] {
    cursor: pointer;
    width: 20px;
    height: 20px;
    accent-color: #1e88e5;
}

/* Datetime input styling */
input[type="datetime-local"],
input[type="date"] {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    color: #0d3b66;
    background: #ffffff;
}

input[type="datetime-local"]:hover,
input[type="date"]:hover {
    border-color: #cbd5e0;
}

input[type="datetime-local"]:focus,
input[type="date"]:focus {
    outline: none;
    border-color: #1e88e5;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
    background: #fafbfc;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
    }
    
    header h1 {
        font-size: 24px;
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filters input[type="text"] {
        width: 100%;
    }
    
    .statistics-panel {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
    }
}

/* ===== Password Page Styles ===== */

#passwordPage {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
    z-index: 10000;
    font-family: inherit;
}

/* Centered Card */
.password-card {
    background: #ffffff;
    padding: 40px 60px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(13, 59, 102, 0.15);
    text-align: center;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    animation: fadeIn 0.4s ease;
}

/* Logo */
.password-logo {
    width: 160px;
    border-radius: 10px;
    margin-bottom: 10px;
}

/* Heading */
.password-card h1 {
    font-size: 22px;
    font-weight: 700;
    color: #0d3b66;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Input box */
.password-input {
    padding: 12px 16px;
    width: 240px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    text-align: center;
    color: #0d3b66;
    background: #ffffff;
    font-family: inherit;
}

.password-input:focus {
    outline: none;
    border-color: #1e88e5;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.15);
    background: #fafbfc;
}

/* Submit button */
.password-btn {
    padding: 12px 28px;
    background: linear-gradient(135deg, #1e88e5 0%, #1976d2 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.password-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 136, 229, 0.4);
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
}

/* Error text */
.password-error {
    color: #dc3545;
    font-weight: 500;
    font-size: 13px;
    display: none;
    margin-top: 5px;
}

/* Fade-in animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 600px) {
    .password-card {
        width: 90%;
        padding: 30px 20px;
    }
    .password-input {
        width: 100%;
    }
}
