/* ==========================================================================
   INVENTORY.CSS - WMS Odoo Integration Stylesheet
   ========================================================================== */

/* Glassmorphism Cards */
.inventory-card {
    background: rgba(30, 41, 59, 0.45);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.inventory-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Connection indicator animation */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

#odoo-status-indicator .status-dot {
    animation: pulse 2s infinite ease-in-out;
}

/* Modern Sub-navigation Tabs */
.inventory-menu::-webkit-scrollbar {
    height: 4px;
}
.inventory-menu::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 4px;
}

.inventory-tab-item {
    padding: 16px 4px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    white-space: nowrap;
}

.inventory-tab-item:hover {
    color: var(--text-color);
}

.inventory-tab-item.active {
    color: #8b5cf6;
    border-bottom-color: #8b5cf6;
}

.inventory-tab-item.active iconify-icon {
    color: #8b5cf6;
    filter: drop-shadow(0 0 4px rgba(139, 92, 246, 0.4));
}

/* Sub-panel transitions */
.inv-sub-panel {
    display: none;
    animation: fadeIn 0.3s ease-out forwards;
}

.inv-sub-panel.active {
    display: block !important;
}

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

/* KPI Cards */
.kpi-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

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

.kpi-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kpi-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 500;
}

.kpi-value {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.2;
}

/* Dashboard Panels */
.dashboard-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.panel-title {
    margin-top: 0;
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Modern Tables */
.styled-table-container {
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    background: var(--card-bg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    max-height: 500px;
    overflow-y: auto;
}

.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.95rem;
}

.modern-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.modern-table th {
    background: var(--hover-color);
    padding: 14px 20px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.modern-table td {
    padding: 16px 20px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    transition: background-color 0.15s ease;
}

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

.modern-table tbody tr:hover td {
    background-color: var(--hover-color);
}

/* Forms and Inputs */
.modern-input {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 8px;
    height: 48px;
    padding: 0 16px;
    transition: all 0.2s ease;
}

.modern-input:focus {
    background-color: var(--card-bg);
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
    outline: none;
}

/* Empty States */
.empty-state-container {
    padding: 60px 20px;
    text-align: center;
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    background: rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Collapsible hierarchy layout for locations */
.location-tree-node {
    margin-left: 20px;
    border-left: 1px dashed var(--border-color);
    padding-left: 10px;
}

.location-tree-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    cursor: pointer;
    border-radius: 6px;
}

.location-tree-header:hover {
    background-color: var(--hover-color);
}
