/**
 * Echo Sidebar - Glassmorphism Style
 * Overrides the old sidebar styles in apps-styles.css
 */

/* ==================== Sidebar Shell ==================== */
#echo-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    right: -320px;
    width: 320px;
    background: var(--bg-color, #eff3f6) !important;
    z-index: 200 !important;
    transition: 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.06) !important;
    display: none !important; /* 默认隐藏 */
    flex-direction: column !important;
    overflow: visible !important;
    backdrop-filter: none !important;
    border: none !important;
    max-width: none !important;
}

#echo-sidebar.active {
    right: 0 !important;
    display: flex !important; /* 激活时显示 */
}

#sidebar-mask {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(84, 110, 122, 0.2) !important;
    backdrop-filter: blur(3px) !important;
    z-index: 150 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: 0.3s !important;
    display: none !important; /* 默认隐藏 */
}

#sidebar-mask.active {
    opacity: 1 !important;
    pointer-events: auto !important;
    display: block !important; /* 激活时显示 */
}

/* ==================== Header ==================== */
#echo-sidebar .sb-header {
    padding: 20px 20px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(200, 215, 225, 0.4);
    flex-shrink: 0;
    background: none;
    position: relative;
}

#echo-sidebar .sb-header::before {
    display: none;
}

#echo-sidebar .sb-header-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--nav-text, #546e7a);
    margin: 0;
}

#echo-sidebar .sb-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #90a4ae;
    font-size: 18px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: 0.2s;
}

#echo-sidebar .sb-close:active {
    transform: scale(0.9);
}

/* ==================== Scrollable Body ==================== */
#echo-sidebar .sb-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 16px 16px 30px;
    scrollbar-width: none;
}

#echo-sidebar .sb-scroll::-webkit-scrollbar {
    display: none;
}

/* ==================== Section & Glass Card ==================== */
#echo-sidebar .sb-section {
    margin-bottom: 16px;
}

#echo-sidebar .sb-section-title {
    font-size: 11px;
    font-weight: 600;
    color: #90a4ae;
    letter-spacing: 1px;
    margin-bottom: 8px;
    padding-left: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
}

#echo-sidebar .glass-card {
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 16px;
    box-shadow: 4px 4px 14px rgba(166, 171, 189, 0.12);
    overflow: hidden;
}

#echo-sidebar .gc-row {
    padding: 13px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(200, 215, 225, 0.25);
    font-size: 14px;
    color: var(--nav-text, #546e7a);
    cursor: pointer;
    transition: background 0.15s;
}

#echo-sidebar .gc-row:active {
    background: rgba(0, 0, 0, 0.02);
}

#echo-sidebar .gc-row:last-child,
#echo-sidebar .gc-row.no-border {
    border-bottom: none;
}

#echo-sidebar .gc-row-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

#echo-sidebar .gc-row-right {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #b0bec5;
    font-size: 13px;
    flex-shrink: 0;
}

#echo-sidebar .gc-note {
    font-size: 11px;
    color: #b0bec5;
    padding: 0 16px 10px 48px;
    border-bottom: 1px solid rgba(200, 215, 225, 0.25);
}

#echo-sidebar .gc-note.no-border {
    border-bottom: none;
}

/* ==================== Toggle Switch ==================== */
#echo-sidebar .sw {
    width: 40px;
    height: 22px;
    border-radius: 11px;
    background: #cfd8dc;
    position: relative;
    transition: 0.3s;
    cursor: pointer;
    flex-shrink: 0;
}

#echo-sidebar .sw.on {
    background: linear-gradient(135deg, #90caf9, #64b5f6);
}

#echo-sidebar .sw-dot {
    position: absolute;
    left: 2px;
    top: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: 0.3s;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

#echo-sidebar .sw.on .sw-dot {
    left: 20px;
}

/* ==================== Chip Tags ==================== */
#echo-sidebar .gc-chip {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    background: rgba(200, 215, 225, 0.3);
    color: #78909c;
    border: 1px solid transparent;
    cursor: pointer;
    margin: 3px;
    display: inline-block;
    transition: 0.2s;
    white-space: nowrap;
}

#echo-sidebar .gc-chip.active {
    background: rgba(100, 181, 246, 0.15);
    color: var(--me-text, #0d47a1);
    border-color: rgba(100, 181, 246, 0.3);
}

/* ==================== Sub Panel ==================== */
#echo-sidebar .sub-panel {
    position: absolute;
    inset: 0;
    background: var(--bg-color, #eff3f6);
    z-index: 10;
    transform: translateX(100%);
    transition: 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
}

#echo-sidebar .sub-panel.open {
    transform: translateX(0);
}

#echo-sidebar .sp-header {
    padding: 20px 16px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(200, 215, 225, 0.4);
    flex-shrink: 0;
}

#echo-sidebar .sp-back {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #78909c;
    font-size: 18px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: 0.2s;
}

#echo-sidebar .sp-back:active {
    transform: scale(0.9);
}

#echo-sidebar .sp-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--nav-text, #546e7a);
}

#echo-sidebar .sp-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
    scrollbar-width: none;
}

#echo-sidebar .sp-body::-webkit-scrollbar {
    display: none;
}

#echo-sidebar .sp-block {
    margin-bottom: 20px;
}

#echo-sidebar .sp-label {
    font-size: 12px;
    color: #90a4ae;
    margin-bottom: 8px;
}

#echo-sidebar .sp-input,
#echo-sidebar .sp-textarea {
    width: 100%;
    border: 1px solid rgba(200, 215, 225, 0.5);
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    padding: 12px;
    font-size: 14px;
    color: var(--nav-text, #546e7a);
    font-family: inherit;
    margin-bottom: 16px;
    box-sizing: border-box;
}

#echo-sidebar .sp-textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}

/* ==================== Buttons ==================== */
#echo-sidebar .sp-save-btn {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(100, 181, 246, 0.2);
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.2), rgba(100, 181, 246, 0.1));
    color: var(--me-text, #0d47a1);
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
    margin-bottom: 10px;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

#echo-sidebar .sp-save-btn:active {
    transform: scale(0.98);
}

#echo-sidebar .sp-save-btn.secondary {
    background: transparent;
    border-color: rgba(200, 215, 225, 0.6);
    color: #90a4ae;
    box-shadow: none;
}

#echo-sidebar .sp-warn-btn {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 205, 210, 0.4);
    background: rgba(255, 235, 238, 0.3);
    color: #e57373;
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

#echo-sidebar .sp-warn-btn:active {
    background: rgba(255, 235, 238, 0.5);
}

#echo-sidebar .sp-warn-btn.danger {
    color: #d32f2f;
    border-color: rgba(255, 205, 210, 0.8);
}

/* ==================== Role Tags ==================== */
#echo-sidebar .sp-role-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

#echo-sidebar .sp-role-tag.me {
    background: rgba(100, 181, 246, 0.15);
    color: var(--me-text, #0d47a1);
}

#echo-sidebar .sp-role-tag.other {
    background: rgba(200, 215, 225, 0.25);
    color: var(--nav-text, #546e7a);
}

/* ==================== Mini Tabs (Local / URL) ==================== */
#echo-sidebar .mini-tabs {
    display: flex;
    gap: 4px;
    background: rgba(200, 215, 225, 0.25);
    border-radius: 8px;
    padding: 2px;
    margin-bottom: 10px;
}

#echo-sidebar .mini-tab {
    flex: 1;
    padding: 6px 0;
    border-radius: 6px;
    border: none;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    color: #90a4ae;
    text-align: center;
    transition: 0.2s;
}

#echo-sidebar .mini-tab.active {
    background: white;
    color: var(--nav-text, #546e7a);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#echo-sidebar .toggle-area {
    display: none;
}

#echo-sidebar .toggle-area.show {
    display: block;
}

/* ==================== Bubble Preview ==================== */
#echo-sidebar .bubble-preview-box {
    background: var(--bg-color, #eff3f6);
    border-radius: 16px;
    padding: 16px;
    border: 1px solid rgba(200, 215, 225, 0.4);
    margin-bottom: 16px;
}

#echo-sidebar .bp-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 12px;
}

#echo-sidebar .bp-row.right {
    flex-direction: row-reverse;
}

#echo-sidebar .bp-row:last-child {
    margin-bottom: 0;
}

#echo-sidebar .bp-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid #fff;
    box-shadow: 1px 2px 6px rgba(0, 0, 0, 0.08);
    object-fit: cover;
    flex-shrink: 0;
}

#echo-sidebar .bp-bubble {
    padding: 8px 14px;
    border-radius: 14px;
    font-size: 13px;
    max-width: 75%;
    line-height: 1.5;
}

#echo-sidebar .bp-row:not(.right) .bp-bubble {
    color: var(--other-text, #546e7a);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 3px 3px 10px rgba(166, 171, 189, 0.2), inset 1px 1px 3px #fff;
    border-bottom-left-radius: 4px;
}

#echo-sidebar .bp-row.right .bp-bubble {
    color: var(--me-text, #0d47a1);
    background: linear-gradient(135deg, rgba(227, 242, 253, 0.8), rgba(187, 222, 251, 0.6));
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: 3px 5px 14px rgba(33, 150, 243, 0.18), inset 2px 2px 4px #fff;
    border-bottom-right-radius: 4px;
}

/* ==================== Video Avatar Slot ==================== */
#echo-sidebar .video-avatar-slot {
    width: 100%;
    aspect-ratio: 9/16;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    border: 2px dashed rgba(200, 215, 225, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

#echo-sidebar .video-avatar-slot img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

#echo-sidebar .video-avatar-slot.has-img img {
    display: block;
}

#echo-sidebar .video-avatar-slot .slot-icon {
    font-size: 32px;
    color: #b0bec5;
    position: relative;
    z-index: 1;
}

#echo-sidebar .video-avatar-slot .slot-text {
    font-size: 11px;
    color: #90a4ae;
    position: relative;
    z-index: 1;
    margin-top: 4px;
}

#echo-sidebar .video-avatar-slot.has-img .slot-icon,
#echo-sidebar .video-avatar-slot.has-img .slot-text {
    display: none;
}

/* ==================== Color Picker ==================== */
#echo-sidebar .picker-container {
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

#echo-sidebar .color-board {
    width: 100%;
    height: 180px;
    border-radius: 12px;
    background: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, transparent);
    background-color: #f00;
    position: relative;
    margin-bottom: 16px;
    cursor: crosshair;
}

#echo-sidebar .color-cursor {
    width: 14px;
    height: 14px;
    border: 2px solid #fff;
    border-radius: 50%;
    position: absolute;
    top: 30%;
    left: 60%;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    transform: translate(-50%, -50%);
}

#echo-sidebar .hue-bar {
    width: 100%;
    height: 16px;
    border-radius: 8px;
    background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
    position: relative;
    margin-bottom: 20px;
    cursor: pointer;
}

#echo-sidebar .hue-slider {
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-radius: 50%;
    position: absolute;
    left: 0;
    top: 0;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

#echo-sidebar .rgb-inputs {
    display: flex;
    gap: 8px;
    align-items: center;
}

#echo-sidebar .color-preview-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

#echo-sidebar .rgb-box {
    flex: 1;
    text-align: center;
    border: 1px solid rgba(200, 215, 225, 0.6);
    border-radius: 8px;
    padding: 6px;
    background: #fff;
}

#echo-sidebar .rgb-box label {
    display: block;
    font-size: 10px;
    color: #90a4ae;
}

#echo-sidebar .rgb-box input {
    width: 100%;
    border: none;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--nav-text, #546e7a);
    background: transparent;
}

/* ==================== Affection Dashboard ==================== */
#echo-sidebar .affection-card {
    padding: 20px;
    background: linear-gradient(135deg, rgba(240, 245, 255, 0.8), rgba(225, 238, 255, 0.6));
    margin-bottom: 16px;
}

#echo-sidebar .affection-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 600;
}

#echo-sidebar .affection-label {
    color: #90a4ae;
}

#echo-sidebar .affection-level {
    color: #e991b4;
}

#echo-sidebar .affection-bar-wrap {
    width: 100%;
    height: 8px;
    background: rgba(200, 215, 225, 0.4);
    border-radius: 4px;
    margin-bottom: 8px;
    overflow: hidden;
}

#echo-sidebar .affection-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #90caf9, #e991b4);
    border-radius: 4px;
    transition: width 0.6s ease;
}

#echo-sidebar .affection-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--me-text, #0d47a1);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

#echo-sidebar .affection-value small {
    font-size: 12px;
    color: #90a4ae;
    font-weight: 400;
}

/* ==================== Group Member Avatars ==================== */
#echo-sidebar .member-avatar-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 12px;
}

#echo-sidebar .member-avatar-row::-webkit-scrollbar {
    display: none;
}

#echo-sidebar .member-avatar-item {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    flex-shrink: 0;
}

#echo-sidebar .member-add-btn {
    min-width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    border: 2px dashed rgba(200, 215, 225, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #90a4ae;
    cursor: pointer;
    flex-shrink: 0;
}

/* ==================== Notice preview ==================== */
#echo-sidebar .notice-preview {
    font-size: 13px;
    color: #90a4ae;
    line-height: 1.5;
    max-height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ==================== Avatar Setter ==================== */
#echo-sidebar .avatar-setter {
    display: flex;
    gap: 16px;
    align-items: center;
    background: rgba(255, 255, 255, 0.4);
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(200, 215, 225, 0.4);
}

#echo-sidebar .avatar-setter img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    flex-shrink: 0;
}

#echo-sidebar .avatar-setter-controls {
    flex: 1;
    min-width: 0;
}

/* ==================== Video Grid ==================== */
#echo-sidebar .video-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

#echo-sidebar .video-col {
    background: rgba(255, 255, 255, 0.4);
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(200, 215, 225, 0.4);
}

/* ==================== Background Preview ==================== */
#echo-sidebar .bg-preview-strip {
    width: 100%;
    height: 80px;
    border-radius: 12px;
    margin-top: 10px;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(200, 215, 225, 0.4);
    display: none;
}

#echo-sidebar .bg-preview-strip.show {
    display: block;
}

/* ==================== Number Input in Row ==================== */
#echo-sidebar .gc-row input[type="number"] {
    width: 60px;
    text-align: center;
    border-radius: 8px;
    border: 1px solid rgba(200, 215, 225, 0.6);
    padding: 6px;
    background: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    color: var(--nav-text, #546e7a);
    font-size: 14px;
}

/* ==================== Member List in Sub-panel ==================== */
#echo-sidebar .member-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(200, 215, 225, 0.25);
}

#echo-sidebar .member-list-item:last-child {
    border-bottom: none;
}

#echo-sidebar .member-list-item img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #fff;
    object-fit: cover;
    flex-shrink: 0;
}

#echo-sidebar .member-list-item .member-name {
    flex: 1;
    font-size: 14px;
    color: var(--nav-text, #546e7a);
}

#echo-sidebar .member-list-item .member-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 6px;
    background: #6c5ce7;
    color: white;
}

#echo-sidebar .member-remove-icon {
    color: #e57373;
    font-size: 18px;
    cursor: pointer;
    transition: 0.2s;
}

#echo-sidebar .member-remove-icon:active {
    transform: scale(0.9);
}

/* ==================== Footer Version ==================== */
#echo-sidebar .sb-footer {
    text-align: center;
    font-size: 11px;
    color: #b0bec5;
    margin-bottom: 20px;
}

/* ==================== Token灵犀感知面板 ==================== */
.token-dashboard {
    margin-bottom: 20px;
    padding: 18px 16px 16px;
    position: relative;
    border-radius: 20px;
    background: radial-gradient(circle at top right, rgba(233, 145, 180, 0.12), transparent 70%),
                radial-gradient(circle at bottom left, rgba(144, 202, 249, 0.12), transparent 70%);
    box-shadow: inset 0 0 25px rgba(255, 255, 255, 0.6), 0 4px 12px rgba(0, 0, 0, 0.02); 
    transition: all 0.4s ease;
}


.td-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 12px; 
}
.td-title { 
    font-size: 11px; 
    font-weight: 700; 
    color: #90a4ae; 
    letter-spacing: 1px; 
    display: flex; 
    align-items: center; 
    gap: 4px; 
}

.td-total-wrap { 
    display: flex; 
    align-items: baseline; 
    cursor: pointer; 
    padding: 4px 8px; 
    border-radius: 12px; 
    transition: 0.2s;
    background: rgba(255,255,255,0.4); 
    border: 1px solid rgba(255,255,255,0.8);
}
.td-total-wrap:hover { 
    background: rgba(255,255,255,0.7); 
    transform: scale(1.02); 
}

.td-total { 
    font-size: 16px; 
    font-weight: 800; 
    color: transparent; 
    background: linear-gradient(135deg, #e991b4, #90caf9); 
    -webkit-background-clip: text; 
    background-clip: text;
    text-shadow: 0 2px 10px rgba(233, 145, 180, 0.25); 
    transition: 0.4s;
}
.td-total-wrap small { 
    font-size: 10px; 
    font-weight: 600; 
    color: #b0bec5; 
    margin-left: 2px; 
}


.td-progress-bar { 
    width: 100%; 
    height: 5px; 
    background: rgba(200, 215, 225, 0.4); 
    border-radius: 3px; 
    margin-bottom: 18px; 
    position: relative; 
    box-shadow: inset 1px 1px 3px rgba(0,0,0,0.06); 
}
.td-progress-fill { 
    height: 100%; 
    width: 0%; 
    border-radius: 3px; 
    transition: width 0.6s cubic-bezier(0.2,0.8,0.2,1), background 0.4s ease, box-shadow 0.4s ease;
    background: linear-gradient(90deg, #90caf9 0%, #b39ddb 50%, #e991b4 100%); 
    box-shadow: 0 0 8px rgba(233, 145, 180, 0.6); 
    position: relative;
    overflow: hidden;
}

.td-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}


.td-threshold-marker {
    position: absolute; 
    top: -3px; 
    bottom: -3px; 
    width: 3px; 
    background: #fff; 
    border-radius: 2px; 
    z-index: 2;
    box-shadow: 0 0 6px #ff4d6d, 0 0 2px rgba(0,0,0,0.2); 
    transition: left 0.4s ease;
}

.td-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 16px 8px; 
    margin-bottom: 14px; 
    align-items: center; 
}
.td-item { 
    display: flex; 
    flex-direction: column; 
    position: relative; 
    padding-left: 4px; 
}
.td-item:not(:nth-child(3n))::after { 
    content: ''; 
    position: absolute; 
    right: 0px; 
    top: 15%; 
    height: 70%; 
    width: 1px; 
    background: linear-gradient(to bottom, transparent, rgba(200,215,225,0.7), transparent); 
}

.td-label { 
    font-size: 10px; 
    color: #90a4ae; 
    margin-bottom: 4px; 
    display: flex; 
    align-items: center; 
    gap: 4px; 
}
.td-value { 
    font-size: 15px; 
    font-weight: 800; 
    color: #546e7a; 
    text-shadow: 1px 1px 0px #fff; 
}

.compress-box { 
    display: flex; 
    align-items: center; 
    gap: 5px; 
    margin-top: 2px; 
}
.c-orig { 
    background: rgba(200,215,225,0.2); 
    padding: 2px 6px; 
    border-radius: 6px; 
    color: #90a4ae; 
    font-size: 12px; 
    text-decoration: line-through; 
}
.c-arrow { 
    color: #e991b4; 
    font-size: 14px; 
    filter: drop-shadow(0 2px 3px rgba(233,145,180,0.3)); 
}
.c-sent { 
    background: linear-gradient(135deg, rgba(233,145,180,0.15), rgba(144,202,249,0.15)); 
    border: 1px solid rgba(233,145,180,0.3); 
    padding: 2px 8px; 
    border-radius: 6px; 
    color: #546e7a; 
    font-weight: 700; 
    font-size: 13px; 
    box-shadow: 0 2px 6px rgba(233,145,180,0.1); 
}

.td-footer { 
    font-size: 11px; 
    color: #78909c; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 6px; 
    padding-top: 14px; 
    margin-top: 6px; 
    border-top: 1px solid rgba(255,255,255,0.9); 
    box-shadow: 0 -1px 0 rgba(200,215,225,0.3); 
}
.td-footer i { 
    color: #e991b4; 
    font-size: 14px; 
    filter: drop-shadow(0 0 3px rgba(233, 145, 180, 0.5)); 
}
.td-footer b { 
    color: transparent; 
    background: linear-gradient(135deg, #e991b4, #ff80ab); 
    -webkit-background-clip: text; 
    background-clip: text;
    font-size: 13px; 
    font-weight: 800; 
}
