/* Scoped Styles for Flipkart Profit & Loss Analyzer Tool */

.pnl-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Upload zone */
.pnl-upload-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    background-color: #ffffff;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.pnl-upload-zone:hover, .pnl-upload-zone.dragover {
    border-color: #4f46e5;
    background-color: #f8fafc;
}

.pnl-upload-icon {
    font-size: 48px;
    color: #64748b;
    margin-bottom: 12px;
}

.pnl-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Progress bar */
.pnl-progress-container {
    display: none;
    margin-top: 15px;
}

/* KPI Cards */
.pnl-kpi-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.pnl-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

.pnl-kpi-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.pnl-kpi-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
}

.pnl-kpi-trend {
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 4px;
}

.pnl-kpi-trend.positive {
    color: #10b981;
}

.pnl-kpi-trend.negative {
    color: #ef4444;
}

/* Warning cards */
.pnl-warning-card {
    border-left: 4px solid #ef4444;
    background-color: #fef2f2;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.pnl-warning-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #991b1b;
    margin-bottom: 2px;
}

.pnl-warning-desc {
    font-size: 0.8rem;
    color: #7f1d1d;
}

/* Insight Cards */
.pnl-insight-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.pnl-insight-text {
    font-size: 0.9rem;
    color: #334155;
    margin-bottom: 0;
    font-weight: 500;
}

/* Table styles */
.pnl-table-wrapper {
    overflow-x: auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.pnl-table {
    width: 100%;
    margin-bottom: 0;
    font-size: 0.9rem;
}

.pnl-table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #475569;
    padding: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.pnl-table td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

/* Tab control overrides */
.pnl-nav-tabs {
    border-bottom: 2px solid #e2e8f0;
}

.pnl-nav-link {
    font-weight: 600;
    color: #64748b;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    padding: 12px 20px;
    transition: all 0.2s ease;
}

.pnl-nav-link:hover {
    color: #4f46e5;
}

.pnl-nav-link.active {
    color: #4f46e5 !important;
    border-bottom: 2px solid #4f46e5 !important;
    background: transparent !important;
}

/* Collapsible guide */
.pnl-guide-accordion {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

.pnl-guide-header {
    background-color: #f8fafc;
    padding: 16px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pnl-guide-accordion summary::-webkit-details-marker {
    display: none;
}

.pnl-guide-accordion summary {
    list-style: none;
}

.pnl-guide-accordion[open] .guide-chevron {
    transform: rotate(180deg);
}

.guide-chevron {
    transition: transform 0.2s ease;
}

.pnl-guide-body {
    padding: 20px;
    border-top: 1px solid #e2e8f0;
}

/* Charts grid */
.pnl-chart-container {
    position: relative;
    height: 300px;
    width: 100%;
    margin-bottom: 20px;
}

.pnl-cost-input {
    width: 90px;
    padding: 4px 8px;
    font-size: 0.85rem;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    text-align: right;
}

.pnl-cost-input:focus {
    border-color: #4f46e5;
    outline: none;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}
