/* LiveKanban - Material Design Custom Styles */

/* ===== Global Styles ===== */
html {
    scroll-behavior: smooth;
}

body {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    font-family: 'Roboto', sans-serif;
}

main {
    flex: 1 0 auto;
    padding-top: 20px;
    padding-bottom: 40px;
}

/* ===== Navbar Customizations ===== */
nav .brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

nav .brand-logo i {
    font-size: 1.8rem;
}

nav ul a {
    display: flex;
    align-items: center;
}

.dropdown-content li > a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #424242 !important;
}

.dropdown-content li > a i {
    margin-right: 8px;
}

/* Sidenav user view */
.sidenav .user-view {
    padding: 32px 32px 16px;
}

.sidenav .user-view .background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
}

/* ===== Cards ===== */
.card {
    border-radius: 8px;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.card:hover {
    box-shadow: 0 8px 17px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
    transform: translateY(-2px);
}

.card .card-title {
    font-weight: 500;
}

.card .card-action {
    border-top: 1px solid rgba(160,160,160,0.2);
}

.card .card-action .btn i,
.card .card-action .btn-large i {
    display: none;
}

/* Card with colored header */
.card-panel.indigo {
    color: white;
}

/* ===== Forms ===== */
.input-field input:focus + label {
    color: #3f51b5 !important;
}

.input-field input:focus {
    border-bottom: 1px solid #3f51b5 !important;
    box-shadow: 0 1px 0 0 #3f51b5 !important;
}

.input-field input.valid {
    border-bottom: 1px solid #4caf50 !important;
    box-shadow: 0 1px 0 0 #4caf50 !important;
}

.input-field input.invalid {
    border-bottom: 1px solid #f44336 !important;
    box-shadow: 0 1px 0 0 #f44336 !important;
}

/* Textarea */
.input-field textarea:focus + label {
    color: #3f51b5 !important;
}

.input-field textarea:focus {
    border-bottom: 1px solid #3f51b5 !important;
    box-shadow: 0 1px 0 0 #3f51b5 !important;
}

/* Select */
.select-wrapper input.select-dropdown:focus {
    border-bottom: 1px solid #3f51b5 !important;
}

/* ===== Buttons ===== */
.btn, .btn-large, .btn-small {
    border-radius: 4px;
    text-transform: none;
    font-weight: 500;
}

.btn i.material-icons {
    margin-right: 8px;
}

.btn-floating i {
    margin-right: 0;
}

/* ===== Hero Section ===== */
.hero-section {
    padding: 60px 0;
    text-align: center;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 20px;
}

.hero-section p.flow-text {
    color: #757575;
}

/* ===== Feature Cards ===== */
.feature-card {
    height: 100%;
}

.feature-card .card-content {
    min-height: 200px;
}

.feature-card i.material-icons {
    font-size: 4rem;
    color: #3f51b5;
    margin-bottom: 15px;
}

/* ===== Kanban Board ===== */
.kanban-board {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    overflow-x: auto;
    min-height: 500px;
}

.kanban-column {
    flex: 1;
    min-width: 300px;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 15px;
}

.kanban-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 12px 15px;
    border-radius: 6px;
}

.kanban-column-header h5 {
    margin: 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.column-todo .kanban-column-header {
    background: #e3f2fd;
    color: #1565c0;
}

.column-inprogress .kanban-column-header {
    background: #fff3e0;
    color: #ef6c00;
}

.column-done .kanban-column-header {
    background: #e8f5e9;
    color: #2e7d32;
}

.kanban-tasks {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kanban-task {
    background: white;
    border-radius: 6px;
    padding: 15px;
    cursor: grab;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    transition: all 0.2s ease;
}

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

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

.kanban-task.sortable-ghost {
    opacity: 0.4;
    background: #e0e0e0;
}

.kanban-task.sortable-drag {
    opacity: 0.9;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    transform: rotate(3deg);
}

.kanban-task.sortable-fallback {
    opacity: 0.9;
    box-shadow: 0 8px 16px rgba(0,0,0,0.25);
    transform: rotate(2deg) scale(1.02);
    background: white;
}

.task-title {
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 8px;
    color: #212121;
}

.task-description {
    font-size: 0.9rem;
    color: #757575;
    margin-bottom: 12px;
    line-height: 1.5;
}

.task-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #eeeeee;
    font-size: 0.8rem;
    color: #9e9e9e;
}

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

.task-actions .btn-flat {
    padding: 0 8px;
    height: 28px;
    line-height: 28px;
    min-width: auto;
}

.task-actions .btn-flat i {
    font-size: 1.2rem;
    margin: 0;
}

/* ===== Board Selector ===== */
.board-selector {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.board-selector h4 {
    margin: 0;
    font-weight: 400;
}

/* ===== Auth Forms ===== */
.auth-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    width: 100%;
    max-width: 450px;
}

.auth-card .card-content {
    padding: 30px;
}

.auth-header {
    text-align: center;
    padding: 30px 30px 20px;
    background: linear-gradient(135deg, #3f51b5 0%, #5c6bc0 100%);
    color: white;
    border-radius: 4px 4px 0 0;
}

.auth-header h4 {
    margin: 0;
    font-weight: 400;
}

.auth-header p {
    margin: 10px 0 0;
    opacity: 0.9;
}

/* Password strength indicator */
.password-strength {
    margin-top: 10px;
}

.strength-bar {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.strength-bar-fill {
    height: 100%;
    transition: width 0.3s, background 0.3s;
    width: 0%;
}

/* ===== Tables ===== */
.table-container {
    overflow-x: auto;
}

table.striped > tbody > tr:nth-child(odd) {
    background-color: #fafafa;
}

/* ===== Loading Spinner ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ===== Modal Customizations ===== */
.modal {
    border-radius: 8px;
    max-height: 95vh;
    width: 70%;
    max-width: 900px;
    overflow: hidden;
    padding: 16px;
}

@media only screen and (max-width: 992px) {
    .modal {
        width: 85%;
    }
}

@media only screen and (max-width: 600px) {
    .modal {
        width: 95%;
        max-height: 90vh;
    }
}

.modal.modal-large {
    width: 85%;
    max-width: 1200px;
}

.modal .modal-header {
    padding: 24px 24px 0;
}

.modal .modal-header h4 {
    margin: 0;
}

.modal .modal-content {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.modal .modal-content::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}

.modal .modal-footer {
    padding: 16px 24px;
}

/* ===== Form Improvements ===== */
.modal textarea.materialize-textarea {
    min-height: 100px;
    padding-top: 1rem;
}

.modal .input-field {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.modal .row {
    margin-bottom: 0;
}

/* ===== Badges ===== */
.badge {
    border-radius: 12px;
    padding: 3px 10px;
    font-size: 0.85rem;
}

.new.badge {
    font-weight: 500;
}

/* ===== Collection (Lists) ===== */
.collection .collection-item.avatar {
    min-height: 84px;
    padding-left: 72px;
}

/* ===== Responsive Adjustments ===== */
@media only screen and (max-width: 600px) {
    .hero-section h1 {
        font-size: 2rem;
    }

    .kanban-board {
        flex-direction: column;
    }

    .kanban-column {
        min-width: 100%;
    }

    .kanban-tasks {
        min-height: 150px;
    }

    .kanban-task {
        touch-action: manipulation;
        user-select: none;
        -webkit-user-select: none;
    }

    .board-selector {
        flex-direction: column;
        gap: 15px;
    }
}

@media only screen and (min-width: 601px) and (max-width: 992px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
}

/* ===== Utilities ===== */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-1 { margin-top: 8px !important; }
.mb-1 { margin-bottom: 8px !important; }
.mt-2 { margin-top: 16px !important; }
.mb-2 { margin-bottom: 16px !important; }
.mt-3 { margin-top: 24px !important; }
.mb-3 { margin-bottom: 24px !important; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* ===== Animations ===== */
.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

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

.slide-in {
    animation: slideIn 0.4s ease-out forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
