/* Inventarios Plataformas — Styles */

.ip-toolbar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-width: 0; }
.ip-toolbar-actions .search-input { max-width: 100%; box-sizing: border-box; }
.ip-sync-btn {
    border: 1px solid rgba(74, 222, 128, 0.45);
    border-radius: 6px;
    background: rgba(74, 222, 128, 0.12);
    color: #4ade80;
    padding: 6px 12px;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}
.ip-sync-btn:hover:not(:disabled) { background: rgba(74, 222, 128, 0.2); }
.ip-sync-btn:disabled { opacity: 0.65; cursor: wait; }
.ip-sync-feedback { color: #cbd5e1; font-size: 0.8rem; margin: 0 0 12px; overflow-wrap: anywhere; }
.ip-sync-feedback[hidden] { display: none; }

.ip-sync-status {
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    padding: 6px 8px;
    font: inherit;
    font-size: 0.75rem;
    text-align: left;
}

.ip-sync-status:not(:disabled) { cursor: pointer; background: rgba(245, 158, 11, 0.08); }
.ip-sync-status:disabled { opacity: 1; }
.ip-nav-alert { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 18px; height: 18px; margin-left: 6px; border: 1px solid #f59e0b; border-radius: 50%; color: #fbbf24; background: rgba(245, 158, 11, 0.12); font-size: 12px; font-weight: 700; line-height: 1; }
.ip-nav-alert[hidden] { display: none; }
.ip-health-unavailable { color: #fbbf24; }
.ip-sync-btn:focus-visible, .ip-sync-status:focus-visible, .ip-retry-btn:focus-visible, .ip-sku-warning:focus-visible,
.ip-issue-list li:focus-visible { outline: 2px solid #fbbf24; outline-offset: 3px; }
.ip-data-date { color: #94a3b8; font-size: 0.72rem; margin: 0 0 12px; }
.ip-snapshot-panel { margin: 0 0 12px; padding: 12px 14px; border: 1px solid rgba(148, 163, 184, .22); border-radius: 8px; background: rgba(15, 23, 42, .35); }
.ip-snapshot-switch { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: 7px; background: #0f172a; }
.ip-snapshot-switch button { padding: 6px 11px; border: 1px solid transparent; border-radius: 5px; color: #94a3b8; background: transparent; font: inherit; font-size: .78rem; cursor: pointer; }
.ip-snapshot-switch button[aria-pressed="true"] { color: #86efac; background: rgba(74, 222, 128, .12); border-color: rgba(74, 222, 128, .3); }
.ip-snapshot-switch button:disabled { cursor: default; opacity: .55; }
.ip-snapshot-switch button:focus-visible { outline: 2px solid #86efac; outline-offset: 3px; }
.ip-snapshot-description { margin: 10px 0 0; color: #cbd5e1; font-size: .76rem; line-height: 1.5; }
.ip-snapshot-captures { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 0; margin: 10px 0 0; }
.ip-snapshot-captures[hidden] { display: none; }
.ip-snapshot-captures li { display: flex; flex-direction: column; gap: 3px; font-size: .7rem; }
.ip-snapshot-captures strong { color: #cbd5e1; }
.ip-snapshot-captures span, .ip-capture-time { color: #94a3b8; }
.ip-capture-time { display: block; margin-top: 5px; font-size: .68rem; font-weight: 400; }
.ip-sync-details, .ip-read-notice {
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 8px;
    background: rgba(245, 158, 11, 0.045);
    padding: 16px;
    margin-bottom: 16px;
    color: #cbd5e1;
    font-size: 0.8rem;
    overflow-wrap: anywhere;
}
.ip-sync-details[hidden], .ip-read-notice[hidden] { display: none; }
.ip-sync-details h3 { margin: 0 0 8px; font-size: 0.95rem; color: #fbbf24; }
.ip-source-incident { margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(148, 163, 184, 0.2); }
.ip-source-incident h4 { color: #e2e8f0; margin: 0 0 8px; font-size: 0.85rem; }
.ip-source-incident h4 span, .ip-issue-code { color: #fbbf24; font-size: 0.7rem; margin-left: 8px; }
.ip-source-incident p { margin: 6px 0; }
.ip-incident-dates { display: flex; gap: 12px 32px; flex-wrap: wrap; margin: 12px 0; }
.ip-incident-dates dt, .ip-incident-note { color: #94a3b8; font-size: 0.74rem; }
.ip-incident-dates dd { margin: 4px 0 0; color: #e2e8f0; }
.ip-issue-list { list-style: none; padding: 0; margin: 12px 0 0; max-height: 320px; overflow-y: auto; }
.ip-issue-list li { padding: 10px 12px; border-left: 2px solid #f59e0b; background: rgba(15, 23, 42, 0.5); margin-bottom: 8px; }
.ip-issue-list small { color: #94a3b8; }
.ip-issue-product { color: #e2e8f0; }
.ip-retry-btn {
    border: 1px solid rgba(148, 163, 184, 0.5);
    border-radius: 6px;
    background: #1e293b;
    color: #e2e8f0;
    font: inherit;
    padding: 6px 10px;
    margin: 10px 0 0;
    cursor: pointer;
}
.ip-read-notice { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ip-read-notice .ip-retry-btn { margin: 0; }
.ip-sku-warning { display: inline-flex; justify-content: center; align-items: center; width: 22px; height: 22px; padding: 0; border: 1px solid #f59e0b; border-radius: 50%; color: #fbbf24; background: rgba(245, 158, 11, 0.1); font-weight: 700; cursor: pointer; }

.ip-td {
    padding: 6px 10px;
    color: #cbd5e1;
    border-bottom: 1px solid rgba(51, 65, 85, 0.2);
    white-space: nowrap;
    font-size: 0.78rem;
}

.ip-td-num {
    color: #64748b;
    font-size: 0.72rem;
    text-align: center;
    width: 35px;
}

.ip-td-sku {
    font-weight: 600;
    color: #93c5fd;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
}

.ip-td-prod {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ip-td-stock {
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.ip-td-num-r {
    text-align: right;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.76rem;
    color: #94a3b8;
}

.ip-th {
    padding: 8px 10px;
    text-align: left;
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    position: sticky;
    top: 0;
    background: #1e293b;
    z-index: 1;
}

/* Hover */
#ip-tbody tr.ip-row-main:hover .ip-td {
    background: rgba(59, 130, 246, 0.06);
}

/* Comestibles badge */
.ip-plat-com {
    background: rgba(161, 98, 7, 0.15);
    color: #d97706;
}

/* Detail expansion */
.ip-detail-cell {
    padding: 0 !important;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.ip-detail-container {
    padding: 12px 20px 16px;
    background: rgba(15, 23, 42, 0.7);
    border-left: 3px solid rgba(34, 197, 94, 0.4);
}

.ip-detail-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #4ade80;
    margin-bottom: 10px;
}

.ip-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.72rem;
}

.ip-detail-table thead tr {
    background: rgba(30, 41, 59, 0.6);
}

.ip-detail-table th {
    padding: 4px 6px;
    color: #64748b;
    font-weight: 600;
    font-size: 0.62rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.ip-detail-table td {
    padding: 4px 6px;
    border-bottom: 1px solid rgba(51, 65, 85, 0.15);
    color: #94a3b8;
}

.ip-det-val {
    text-align: right;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
}

.ip-fulfillment-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
    white-space: nowrap;
}

.ip-fulfillment-mode {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    padding: 1px 7px;
    border: 1px solid color-mix(in srgb, var(--pv-accent-cyan, #22d3ee) 35%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--pv-accent-cyan, #22d3ee) 10%, transparent);
    color: var(--pv-accent-cyan, #22d3ee);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.ip-fulfillment-sources {
    color: var(--pv-text-muted, #94a3b8);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.64rem;
}

.ip-detail-table td.ip-amazon-stock-cell {
    padding: 6px 6px 18px;
}

.ip-amazon-stock {
    padding: 14px 16px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.45);
}

.ip-amazon-stock-heading {
    color: #e2e8f0;
    font-size: 0.8rem;
    font-weight: 700;
}

.ip-amazon-stock-policy,
.ip-amazon-stock-note {
    margin: 6px 0 12px;
    color: #94a3b8;
    font-size: 0.72rem;
    line-height: 1.5;
}

.ip-amazon-stock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 8px;
    margin: 0 0 12px;
}

.ip-amazon-stock-item {
    padding: 10px 12px;
    border-radius: 6px;
    background: rgba(34, 197, 94, 0.06);
    border: 1px solid rgba(34, 197, 94, 0.14);
}

.ip-amazon-stock-item dt,
.ip-amazon-stock-totals dt {
    color: #cbd5e1;
    font-size: 0.72rem;
    line-height: 1.4;
}

.ip-amazon-stock dt span {
    display: block;
    margin-top: 3px;
    color: #94a3b8;
    font-size: 0.65rem;
}

.ip-amazon-stock dd {
    margin: 7px 0 0;
    color: #86efac;
    font-size: 0.88rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.ip-amazon-stock-excluded {
    background: rgba(148, 163, 184, 0.06);
    border-color: rgba(148, 163, 184, 0.15);
}

.ip-amazon-stock-excluded dd {
    color: #cbd5e1;
}

.ip-amazon-stock-totals {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 30px;
    margin: 0;
    padding-top: 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.ip-amazon-stock-totals dd {
    color: #cbd5e1;
}

.ip-amazon-stock-total dt,
.ip-amazon-stock-total dd {
    color: #86efac;
}

.ip-amazon-stock-note {
    color: #fbbf24;
    margin: 12px 0 0;
}
