/* Premium Glassmorphic Styling for Dealer State Panel */

.ds-panel {
    position: fixed;
    width: 500px;
    max-height: 82vh;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    font-family: 'Sora', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 12px;
    overflow: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.ds-panel-hidden {
    display: none !important;
}

.ds-panel-minimized .ds-body {
    display: none !important;
}

.ds-header {
    background: rgba(30, 41, 59, 0.85);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: move;
    user-select: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ds-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 14px;
    color: #f8fafc;
    letter-spacing: -0.01em;
}

.ds-badge {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.ds-badge-green { background: linear-gradient(135deg, #10b981, #047857); box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3); }
.ds-badge-red { background: linear-gradient(135deg, #ef4444, #b91c1c); box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3); }
.ds-badge-amber { background: linear-gradient(135deg, #f59e0b, #b45309); box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3); }
.ds-badge-purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3); }
.ds-badge-cyan { background: linear-gradient(135deg, #06b6d4, #0e7490); box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3); }

.ds-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ds-btn-icon {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.ds-btn-icon:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #f8fafc;
}

.ds-body {
    overflow-y: auto;
    padding: 12px;
    max-height: calc(82vh - 48px);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ds-section {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.ds-section:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.ds-section-header {
    padding: 11px 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #cbd5e1;
    user-select: none;
    font-size: 12px;
}

.ds-section-header:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #f8fafc;
}

.ds-chevron {
    font-size: 11px;
    color: #64748b;
    transition: transform 0.2s ease;
}

.ds-section-content {
    display: none;
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(15, 23, 42, 0.5);
}

.ds-section.ds-open .ds-section-content {
    display: block;
}

.ds-section.ds-open .ds-chevron {
    transform: rotate(180deg);
}

.ds-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.ds-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.ds-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 10px 8px;
    text-align: center;
}

.ds-label {
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
    font-weight: 600;
}

.ds-val {
    font-size: 16px;
    font-weight: 700;
    color: #38bdf8;
}

/* Dynamic Value Color Utilities */
.val-green { color: #4ade80 !important; }
.val-red { color: #f43f5e !important; }
.val-amber { color: #fbbf24 !important; }
.val-cyan { color: #38bdf8 !important; }
.val-purple { color: #c084fc !important; }
.val-neutral { color: #e2e8f0 !important; }

.ds-val-small {
    font-size: 12px;
    font-weight: 600;
    color: #e2e8f0;
    word-break: break-all;
}

.ds-sub {
    font-size: 10px;
    color: #64748b;
    margin-top: 3px;
}

.ds-row-flex {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.ds-pill {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    color: #cbd5e1;
}

.ds-sub-heading {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    margin: 12px 0 6px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ds-bars-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ds-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}

.ds-bar-label {
    width: 120px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ds-bar-track {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.ds-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.ds-bar-pct {
    width: 36px;
    text-align: right;
    font-weight: 600;
    color: #cbd5e1;
}

.ds-kv-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ds-kv-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    padding: 6px 10px;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    color: #cbd5e1;
}

.ds-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.ds-table th, .ds-table td {
    padding: 7px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ds-table th {
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.03em;
    background: rgba(30, 41, 59, 0.6);
}

.ds-table td {
    color: #cbd5e1;
}

.ds-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.ds-text-box {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 10px;
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.5;
}

.ds-toggle-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 18px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(29, 78, 216, 0.4);
    z-index: 9998;
    backdrop-filter: blur(10px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ds-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(29, 78, 216, 0.6);
}
