/**
 * Solarhub Flow - Kanban Board & Project Stepper Styles
 */

/* Kanban Board Layout */
.kanban-wrapper {
    overflow-x: auto;
    padding-bottom: 1.5rem;
}

.kanban-board {
    display: flex;
    gap: 1.25rem;
    min-width: 1540px; /* Ensure 7 columns fit nicely */
    align-items: flex-start;
}

.kanban-column {
    flex: 1;
    min-width: 240px;
    max-width: 280px;
    background: #f1f5f9;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 220px);
}

.column-header {
    padding: 0.9rem 1rem;
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
    border-bottom: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
}

.column-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--secondary);
}

.column-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    background: #e2e8f0;
    color: var(--text-muted);
}

.column-cards {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    flex: 1;
    min-height: 120px;
}

/* Kanban Project Card */
.project-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.project-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.project-code {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-sm);
}

.card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--secondary);
    line-height: 1.3;
}

.card-customer {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.card-metrics {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
    border: 1px solid #f1f5f9;
}

.metric-item {
    display: flex;
    flex-direction: column;
}

.metric-item .label {
    font-size: 0.65rem;
    color: var(--text-light);
    text-transform: uppercase;
}

.metric-item .val {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--secondary);
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.4rem;
    border-top: 1px dashed var(--border-color);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.card-user {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Table View */
.table-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table-responsive {
    overflow-x: auto;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.875rem;
}

.custom-table th {
    background: #f8fafc;
    color: var(--text-muted);
    font-weight: 600;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
}

.custom-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    vertical-align: middle;
}

.custom-table tr:last-child td {
    border-bottom: none;
}

.custom-table tr:hover td {
    background-color: #f8fafc;
}

/* Project Detail Page Styles */
.detail-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}

.banner-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.banner-title h1 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.banner-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 0.5rem;
    color: #94a3b8;
    font-size: 0.875rem;
    flex-wrap: wrap;
}

.banner-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* 7-Phase Stepper in Detail Banner */
.phase-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 1rem;
    overflow-x: auto;
    gap: 0.5rem;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.8rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: #94a3b8;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.step-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.step-num {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.step-item.completed .step-num {
    background: #10b981;
    color: #ffffff;
}

.step-item.active {
    background: rgba(2, 132, 199, 0.25);
    border: 1px solid #0284c7;
    color: #ffffff;
    font-weight: 600;
}

.step-item.active .step-num {
    background: #0284c7;
    color: #ffffff;
}

/* Tabs Layout in Project Detail */
.tabs-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.tab-btn {
    padding: 0.75rem 1.25rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

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

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

/* Detail Section Cards */
.detail-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.detail-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.detail-card-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
