/* ═══════════════════════════════════════════════════════════════════════════
   DPC Dashboard — Modern Glassmorphism Profile Dashboard
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── CSS Variables ──────────────────────────────────────────────────────── */
:root {
    --dpc-bg: #f0f2f5;
    --dpc-surface: rgba(255,255,255,0.82);
    --dpc-surface-solid: #ffffff;
    --dpc-surface-hover: rgba(255,255,255,0.95);
    --dpc-glass: rgba(255,255,255,0.55);
    --dpc-glass-border: rgba(255,255,255,0.35);
    --dpc-blur: 16px;
    --dpc-text: #1e293b;
    --dpc-text-secondary: #64748b;
    --dpc-text-muted: #94a3b8;
    --dpc-border: rgba(0,0,0,0.06);
    --dpc-shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    --dpc-shadow-md: 0 4px 14px rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.04);
    --dpc-shadow-lg: 0 10px 30px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
    --dpc-shadow-glow: 0 0 40px rgba(99,102,241,0.08);
    --dpc-radius: 16px;
    --dpc-radius-sm: 10px;
    --dpc-radius-xs: 6px;
    --dpc-transition: 0.25s cubic-bezier(0.4,0,0.2,1);
    --dpc-primary: #6366f1;
    --dpc-primary-light: #818cf8;
    --dpc-success: #10b981;
    --dpc-warning: #f59e0b;
    --dpc-danger: #ef4444;
    --dpc-accent: #e7b733;
}

/* ── Dashboard Wrapper ──────────────────────────────────────────────────── */
.dpc-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px 60px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--dpc-text);
    -webkit-font-smoothing: antialiased;
}

/* ── Profile Header ─────────────────────────────────────────────────────── */
.dpc-dash-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px 32px;
    background: var(--dpc-surface);
    backdrop-filter: blur(var(--dpc-blur));
    -webkit-backdrop-filter: blur(var(--dpc-blur));
    border: 1px solid var(--dpc-glass-border);
    border-radius: var(--dpc-radius);
    box-shadow: var(--dpc-shadow-md);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    animation: dpcFadeInUp 0.5s ease both;
}

.dpc-dash-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--dpc-primary), var(--dpc-accent), var(--dpc-success));
    border-radius: var(--dpc-radius) var(--dpc-radius) 0 0;
}

.dpc-dash-avatar {
    flex-shrink: 0;
}

.dpc-dash-avatar img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--dpc-glass-border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform var(--dpc-transition);
}

.dpc-dash-avatar img:hover {
    transform: scale(1.08);
}

.dpc-dash-info {
    flex: 1;
    min-width: 0;
}

.dpc-dash-name {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--dpc-text);
}

.dpc-dash-email {
    font-size: 13px;
    color: var(--dpc-text-secondary);
    margin: 0 0 8px;
}

.dpc-dash-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(99,102,241,0.1);
    color: var(--dpc-primary);
}

.dpc-dash-badge.dpc-type-free      { background: rgba(148,163,184,0.12); color: #64748b; }
.dpc-dash-badge.dpc-type-basic     { background: rgba(59,130,246,0.1); color: #3b82f6; }
.dpc-dash-badge.dpc-type-premium   { background: rgba(231,183,51,0.12); color: #c9960c; }
.dpc-dash-badge.dpc-type-vip       { background: rgba(139,92,246,0.1); color: #8b5cf6; }

.dpc-dash-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* ── Toolbar ────────────────────────────────────────────────────────────── */
.dpc-dash-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    animation: dpcFadeInUp 0.5s ease 0.1s both;
}

.dpc-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--dpc-border);
    border-radius: var(--dpc-radius-sm);
    background: var(--dpc-surface);
    backdrop-filter: blur(8px);
    color: var(--dpc-text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--dpc-transition);
    box-shadow: var(--dpc-shadow-sm);
}

.dpc-toolbar-btn:hover {
    background: var(--dpc-surface-hover);
    color: var(--dpc-primary);
    border-color: rgba(99,102,241,0.2);
    box-shadow: var(--dpc-shadow-md);
    transform: translateY(-1px);
}

.dpc-toolbar-btn.active {
    background: var(--dpc-primary);
    color: #fff;
    border-color: var(--dpc-primary);
}

.dpc-toolbar-btn svg {
    width: 15px;
    height: 15px;
}

.dpc-toolbar-spacer {
    flex: 1;
}

/* ── Widget Grid ────────────────────────────────────────────────────────── */
.dpc-widget-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    min-height: 200px;
}

@media (max-width: 768px) {
    .dpc-widget-grid {
        grid-template-columns: 1fr;
    }
    .dpc-dash-header {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
    }
    .dpc-dash-actions {
        justify-content: center;
    }
}

/* ── Widget Card ────────────────────────────────────────────────────────── */
.dpc-widget-card {
    background: var(--dpc-surface);
    backdrop-filter: blur(var(--dpc-blur));
    -webkit-backdrop-filter: blur(var(--dpc-blur));
    border: 1px solid var(--dpc-glass-border);
    border-radius: var(--dpc-radius);
    box-shadow: var(--dpc-shadow-md);
    overflow: hidden;
    transition: all var(--dpc-transition);
    animation: dpcFadeInUp 0.4s ease both;
}

.dpc-widget-card:hover {
    box-shadow: var(--dpc-shadow-lg), var(--dpc-shadow-glow);
    transform: translateY(-2px);
}

.dpc-widget-half {
    grid-column: span 1;
}

.dpc-widget-full {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .dpc-widget-half,
    .dpc-widget-full {
        grid-column: 1 / -1;
    }
}

/* ── Widget Header ──────────────────────────────────────────────────────── */
.dpc-widget-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--dpc-border);
    position: relative;
    background: rgba(255,255,255,0.5);
}

.dpc-widget-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 3px;
    background: var(--widget-accent, var(--dpc-primary));
    border-radius: 0 3px 3px 0;
}

.dpc-widget-drag-handle {
    cursor: grab;
    color: var(--dpc-text-muted);
    padding: 4px;
    border-radius: 4px;
    transition: all var(--dpc-transition);
    display: flex;
    align-items: center;
    opacity: 0.4;
}

.dpc-widget-card:hover .dpc-widget-drag-handle {
    opacity: 1;
}

.dpc-widget-drag-handle:hover {
    background: rgba(0,0,0,0.05);
    color: var(--dpc-primary);
}

.dpc-widget-drag-handle:active {
    cursor: grabbing;
}

.dpc-widget-header-icon {
    color: var(--widget-accent, var(--dpc-primary));
    display: flex;
    align-items: center;
}

.dpc-widget-title {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    color: var(--dpc-text);
}

.dpc-widget-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity var(--dpc-transition);
}

.dpc-widget-card:hover .dpc-widget-actions {
    opacity: 1;
}

.dpc-widget-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--dpc-text-muted);
    cursor: pointer;
    transition: all var(--dpc-transition);
}

.dpc-widget-btn:hover {
    background: rgba(0,0,0,0.06);
    color: var(--dpc-text);
}

.dpc-widget-hide:hover {
    background: rgba(239,68,68,0.1);
    color: var(--dpc-danger);
}

/* ── Widget Body ────────────────────────────────────────────────────────── */
.dpc-widget-body {
    padding: 20px;
}

/* ── Drag & Drop States ─────────────────────────────────────────────────── */
.dpc-widget-grid.dpc-dragging .dpc-widget-card {
    transition: transform 0.2s ease;
}

.dpc-widget-card.dpc-drag-active {
    opacity: 0.5;
    transform: scale(0.96) !important;
    box-shadow: 0 0 0 2px var(--dpc-primary) !important;
}

.dpc-widget-card.dpc-drag-over {
    transform: scale(1.02);
    box-shadow: 0 0 0 2px var(--dpc-primary), var(--dpc-shadow-lg) !important;
}

.dpc-drag-placeholder {
    border: 2px dashed rgba(99,102,241,0.3);
    border-radius: var(--dpc-radius);
    background: rgba(99,102,241,0.04);
    min-height: 120px;
    transition: all 0.2s ease;
}

/* ── Widget Picker Panel ────────────────────────────────────────────────── */
.dpc-picker-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.dpc-picker-overlay.open {
    opacity: 1;
    visibility: visible;
}

.dpc-picker-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    background: var(--dpc-surface-solid);
    box-shadow: -8px 0 30px rgba(0,0,0,0.12);
    z-index: 9999;
    transition: right 0.35s cubic-bezier(0.4,0,0.2,1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dpc-picker-panel.open {
    right: 0;
}

.dpc-picker-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--dpc-border);
    flex-shrink: 0;
}

.dpc-picker-header h3 {
    flex: 1;
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.dpc-picker-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--dpc-text-muted);
    cursor: pointer;
    transition: all var(--dpc-transition);
}

.dpc-picker-close:hover {
    background: rgba(239,68,68,0.1);
    color: var(--dpc-danger);
}

.dpc-picker-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

.dpc-picker-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--dpc-border);
    border-radius: var(--dpc-radius-sm);
    margin-bottom: 10px;
    cursor: pointer;
    transition: all var(--dpc-transition);
    background: var(--dpc-surface);
}

.dpc-picker-item:hover {
    border-color: rgba(99,102,241,0.25);
    background: rgba(99,102,241,0.03);
    transform: translateX(-2px);
    box-shadow: var(--dpc-shadow-sm);
}

.dpc-picker-item.active {
    border-color: rgba(99,102,241,0.3);
    background: rgba(99,102,241,0.06);
}

.dpc-picker-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
}

.dpc-picker-meta {
    flex: 1;
    min-width: 0;
}

.dpc-picker-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--dpc-text);
    margin-bottom: 2px;
}

.dpc-picker-desc {
    font-size: 12px;
    color: var(--dpc-text-muted);
    line-height: 1.4;
}

.dpc-picker-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.dpc-picker-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.dpc-picker-toggle .dpc-toggle-track {
    display: block;
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: #d1d5db;
    transition: background 0.2s ease;
    cursor: pointer;
    position: relative;
}

.dpc-picker-toggle .dpc-toggle-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    transition: transform 0.2s ease;
}

.dpc-picker-toggle input:checked + .dpc-toggle-track {
    background: var(--dpc-primary);
}

.dpc-picker-toggle input:checked + .dpc-toggle-track::after {
    transform: translateX(20px);
}


/* ══════════════════════════════════════════════════════════════════════════
   WIDGET-SPECIFIC STYLES
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Quota Overview ─────────────────────────────────────────────────────── */
.dpcw-quota-overview {
    text-align: center;
}

.dpcw-donut-wrap {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 20px;
}

.dpcw-donut {
    width: 100%;
    height: 100%;
}

.dpcw-donut-bg {
    opacity: 0.3;
}

.dpcw-donut-fill {
    transition: stroke-dashoffset 1s cubic-bezier(0.4,0,0.2,1);
}

.dpcw-donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dpcw-donut-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--dpc-text);
    line-height: 1;
}

.dpcw-donut-label {
    font-size: 11px;
    color: var(--dpc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.dpcw-stats-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 16px;
}

.dpcw-stat-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--dpc-radius-sm);
    background: rgba(0,0,0,0.02);
    border: 1px solid var(--dpc-border);
}

.dpcw-stat-icon {
    display: flex;
    align-items: center;
}

.dpcw-stat-info {
    display: flex;
    flex-direction: column;
}

.dpcw-stat-num {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}

.dpcw-stat-lbl {
    font-size: 10px;
    color: var(--dpc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.dpcw-quota-bar-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px;
}

.dpcw-quota-bar-track {
    flex: 1;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.dpcw-quota-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1s cubic-bezier(0.4,0,0.2,1);
}

.dpcw-quota-bar-pct {
    font-size: 12px;
    font-weight: 600;
    color: var(--dpc-text-secondary);
    min-width: 36px;
    text-align: right;
}


/* ── Daily Stats ────────────────────────────────────────────────────────── */
.dpcw-daily-stats {
    position: relative;
}

.dpcw-daily-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.dpcw-daily-summary {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.dpcw-daily-sum-item {
    display: flex;
    flex-direction: column;
}

.dpcw-sum-val {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.dpcw-sum-lbl {
    font-size: 10px;
    color: var(--dpc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.dpcw-period-toggle {
    display: flex;
    background: rgba(0,0,0,0.04);
    border-radius: 8px;
    padding: 2px;
    flex-shrink: 0;
}

.dpcw-period-btn {
    padding: 5px 12px;
    border: none;
    border-radius: 6px;
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    color: var(--dpc-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.dpcw-period-btn.active {
    background: #fff;
    color: var(--dpc-primary);
    box-shadow: var(--dpc-shadow-sm);
}

.dpcw-period-btn:hover:not(.active) {
    color: var(--dpc-text);
}

.dpcw-daily-legend {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--dpc-text-muted);
    margin-bottom: 12px;
}

.dpcw-legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dpcw-chart-container {
    position: relative;
    padding: 8px 0;
}

.dpcw-chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 140px;
    padding-bottom: 24px;
    position: relative;
}

.dpcw-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    position: relative;
    cursor: pointer;
}

.dpcw-bar-group:hover .dpcw-bar {
    filter: brightness(1.1);
}

.dpcw-bar-pair {
    flex: 1;
    display: flex;
    align-items: flex-end;
    gap: 1px;
    width: 100%;
}

.dpcw-bar {
    flex: 1;
    border-radius: 3px 3px 0 0;
    transition: height 0.6s cubic-bezier(0.4,0,0.2,1), filter 0.2s ease;
    min-height: 2px;
}

.dpcw-bar-used {
    background: var(--dpc-danger);
    opacity: 0.85;
}

.dpcw-bar-cred {
    background: var(--dpc-success);
    opacity: 0.85;
}

.dpcw-bar-label {
    font-size: 9px;
    color: var(--dpc-text-muted);
    margin-top: 4px;
    position: absolute;
    bottom: 0;
    white-space: nowrap;
}

.dpcw-empty-chart {
    text-align: center;
    padding: 24px;
    color: var(--dpc-text-muted);
}

.dpcw-empty-chart svg {
    margin-bottom: 10px;
    opacity: 0.4;
}

.dpcw-empty-chart p {
    margin: 0;
    font-size: 13px;
}

/* ── Quota History ──────────────────────────────────────────────────────── */
.dpcw-history-wrap {
    position: relative;
}

.dpcw-history-filter {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}

.dpcw-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border: 1px solid var(--dpc-border);
    border-radius: 20px;
    background: transparent;
    font-size: 12px;
    font-weight: 500;
    color: var(--dpc-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.dpcw-filter-btn:hover {
    color: var(--dpc-text);
    border-color: rgba(0,0,0,0.12);
}

.dpcw-filter-btn.active {
    background: var(--dpc-primary);
    color: #fff;
    border-color: var(--dpc-primary);
}

.dpcw-filter-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.dpcw-history-scroll {
    max-height: 420px;
    overflow-y: auto;
    overflow-x: auto;
    border-radius: var(--dpc-radius-sm);
    border: 1px solid var(--dpc-border);
}

.dpcw-history-scroll::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.dpcw-history-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.dpcw-history-scroll::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.12);
    border-radius: 3px;
}

.dpcw-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.dpcw-history-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
}

.dpcw-history-table th {
    background: rgba(248,250,252,0.95);
    backdrop-filter: blur(4px);
    padding: 10px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--dpc-text-muted);
    border-bottom: 1px solid var(--dpc-border);
    white-space: nowrap;
}

.dpcw-history-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    vertical-align: middle;
    white-space: nowrap;
}

.dpcw-history-table tbody tr {
    transition: background 0.15s ease;
}

.dpcw-history-table tbody tr:hover {
    background: rgba(99,102,241,0.03);
}

.dpcw-history-table tbody tr.dpcw-row-hidden {
    display: none;
}

.dpcw-dir-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.dpcw-dir-in {
    background: rgba(16,185,129,0.1);
    color: var(--dpc-success);
}

.dpcw-dir-out {
    background: rgba(239,68,68,0.1);
    color: var(--dpc-danger);
}

.dpcw-type-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    background: rgba(0,0,0,0.04);
    color: var(--dpc-text-secondary);
}

.dpcw-type-post { background: rgba(59,130,246,0.08); color: #3b82f6; }
.dpcw-type-widget { background: rgba(139,92,246,0.08); color: #8b5cf6; }
.dpcw-type-system { background: rgba(107,114,128,0.08); color: #6b7280; }

.dpcw-col-label a {
    color: var(--dpc-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.dpcw-col-label a:hover {
    color: var(--dpc-primary-light);
    text-decoration: underline;
}

.dpcw-col-cost {
    font-weight: 700;
    font-size: 13px;
}

.dpcw-col-cost.dpcw-dir-in  { color: var(--dpc-success); }
.dpcw-col-cost.dpcw-dir-out { color: var(--dpc-danger); }

.dpcw-col-balance {
    font-weight: 600;
    color: var(--dpc-text-secondary);
}

.dpcw-col-date {
    color: var(--dpc-text-muted);
    font-size: 12px;
}

/* ── Empty State ────────────────────────────────────────────────────────── */
.dpcw-history-empty {
    text-align: center;
    padding: 40px 20px;
}

.dpcw-empty-icon {
    margin-bottom: 12px;
    opacity: 0.4;
}

.dpcw-history-empty h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--dpc-text-secondary);
    margin: 0 0 6px;
}

.dpcw-history-empty p {
    font-size: 13px;
    color: var(--dpc-text-muted);
    margin: 0;
    max-width: 300px;
    margin: 0 auto;
}


/* ══════════════════════════════════════════════════════════════════════════
   LOGIN PROMPT
   ══════════════════════════════════════════════════════════════════════════ */
.dpc-dash-login {
    max-width: 440px;
    margin: 60px auto;
    text-align: center;
    padding: 48px 36px;
    background: var(--dpc-surface);
    backdrop-filter: blur(var(--dpc-blur));
    border: 1px solid var(--dpc-glass-border);
    border-radius: var(--dpc-radius);
    box-shadow: var(--dpc-shadow-lg);
    animation: dpcFadeInUp 0.5s ease both;
}

.dpc-dash-login svg {
    margin-bottom: 16px;
    opacity: 0.7;
}

.dpc-dash-login h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--dpc-text);
}

.dpc-dash-login p {
    font-size: 14px;
    color: var(--dpc-text-muted);
    margin: 0 0 24px;
}

.dpc-dash-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--dpc-radius-sm);
    background: var(--dpc-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--dpc-transition);
    box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}

.dpc-dash-login-btn:hover {
    background: var(--dpc-primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(99,102,241,0.35);
    color: #fff;
}


/* ══════════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════════════════════════════ */
@keyframes dpcFadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes dpcPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Stagger widget card animations */
.dpc-widget-card:nth-child(1) { animation-delay: 0.1s; }
.dpc-widget-card:nth-child(2) { animation-delay: 0.18s; }
.dpc-widget-card:nth-child(3) { animation-delay: 0.26s; }
.dpc-widget-card:nth-child(4) { animation-delay: 0.34s; }
.dpc-widget-card:nth-child(5) { animation-delay: 0.42s; }
.dpc-widget-card:nth-child(6) { animation-delay: 0.5s; }


/* ══════════════════════════════════════════════════════════════════════════
   TOAST NOTIFICATION
   ══════════════════════════════════════════════════════════════════════════ */
.dpc-dash-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--dpc-text);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--dpc-radius-sm);
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 10000;
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
    pointer-events: none;
    white-space: nowrap;
}

.dpc-dash-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ══════════════════════════════════════════════════════════════════════════
   GRID EMPTY STATE
   ══════════════════════════════════════════════════════════════════════════ */
.dpc-grid-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--dpc-text-muted);
    animation: dpcFadeInUp 0.5s ease both;
}

.dpc-grid-empty svg {
    margin-bottom: 16px;
    opacity: 0.3;
}

.dpc-grid-empty h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--dpc-text-secondary);
    margin: 0 0 6px;
}

.dpc-grid-empty p {
    font-size: 13px;
    margin: 0;
}

/* ==========================================
   DATA CARD (Air Pollution / Gauge Style)
   ========================================== */
.dpcw-data-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 8px 0;
}

.dpcw-dc-header {
    text-align: center;
}

.dpcw-dc-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    color: var(--dpc-text-primary);
}

.dpcw-dc-subtitle {
    font-size: 12px;
    margin: 2px 0 0;
    color: var(--dpc-text-muted);
}

.dpcw-dc-gauge {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.dpcw-dc-gauge-inner {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: var(--dpc-surface);
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.06);
}

.dpcw-dc-gauge-val {
    font-size: 38px;
    font-weight: 800;
    line-height: 1;
    color: var(--dpc-text-primary);
}

.dpcw-dc-gauge-unit {
    font-size: 16px;
    font-weight: 600;
    color: var(--dpc-text-muted);
}

.dpcw-dc-status {
    display: inline-block;
    padding: 4px 18px;
    border-radius: 20px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.dpcw-dc-metrics {
    display: flex;
    gap: 8px;
    width: 100%;
}

.dpcw-dc-metric {
    flex: 1;
    text-align: center;
    padding: 10px 6px;
    border-radius: 10px;
    background: rgba(0,0,0,0.03);
}

.dpcw-dc-metric-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--dpc-text-muted);
    margin-bottom: 4px;
}

.dpcw-dc-metric-val {
    font-size: 18px;
    font-weight: 700;
    color: var(--dpc-text-primary);
}

/* ==========================================
   GRAPH1 (Crypto Currency / Dark Sparkline)
   ========================================== */
.dpcw-graph1 {
    padding: 0;
}

.dpcw-g1-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 600px) {
    .dpcw-g1-cards {
        grid-template-columns: 1fr;
    }
}

.dpcw-g1-card {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 16px;
    color: #e2e8f0;
}

.dpcw-g1-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.dpcw-g1-card-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

.dpcw-g1-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dpcw-g1-change {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.dpcw-g1-up {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
}

.dpcw-g1-down {
    background: rgba(34,197,94,0.15);
    color: #22c55e;
}

.dpcw-g1-value {
    font-size: 22px;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 12px;
}

.dpcw-g1-value small {
    font-size: 12px;
    font-weight: 400;
    color: #64748b;
    margin-left: 6px;
}

.dpcw-g1-chart {
    height: 60px;
    overflow: hidden;
    border-radius: 6px;
}

.dpcw-g1-svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* ==========================================
   PROGRESS BAR (Striped Animated)
   ========================================== */
.dpcw-progressbar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dpcw-pb-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dpcw-pb-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.dpcw-pb-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--dpc-text-primary);
}

.dpcw-pb-counter {
    font-size: 13px;
    font-weight: 700;
}

.dpcw-pb-counter small {
    font-weight: 400;
    opacity: 0.7;
}

.dpcw-pb-track {
    height: 16px;
    background: rgba(0,0,0,0.05);
    border-radius: 10px;
    overflow: hidden;
}

.dpcw-pb-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease;
    min-width: 0;
}

.dpcw-pb-striped {
    background-size: 20px 20px;
    background-image: linear-gradient(
        45deg,
        rgba(255,255,255,0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255,255,255,0.2) 50%,
        rgba(255,255,255,0.2) 75%,
        transparent 75%,
        transparent
    );
    animation: dpcw-stripe 1s linear infinite;
}

@keyframes dpcw-stripe {
    from { background-position: 20px 0; }
    to   { background-position: 0 0; }
}

.dpcw-pb-total {
    text-align: center;
    font-size: 13px;
    color: var(--dpc-text-muted);
    padding-top: 8px;
    border-top: 1px solid rgba(0,0,0,0.06);
}

.dpcw-pb-total strong {
    color: var(--dpc-text-primary);
}

/* ==========================================
   ACCORDION INFO
   ========================================== */
.dpcw-accordion {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dpcw-acc-item {
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.dpcw-acc-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.dpcw-acc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--dpc-text-primary);
    text-align: left;
    transition: color 0.2s;
}

.dpcw-acc-header:hover {
    color: var(--dpc-primary);
}

.dpcw-acc-icon {
    flex-shrink: 0;
    color: var(--dpc-text-muted);
    transition: transform 0.3s;
}

.dpcw-acc-open .dpcw-acc-icon {
    transform: rotate(45deg);
    color: var(--dpc-primary);
}

.dpcw-acc-vline {
    transition: opacity 0.3s;
}

.dpcw-acc-open .dpcw-acc-vline {
    opacity: 0;
}

.dpcw-acc-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.dpcw-acc-content {
    padding: 0 16px 14px;
    font-size: 13px;
    line-height: 1.65;
    color: var(--dpc-text-secondary);
}

.dpcw-acc-content strong {
    color: var(--dpc-text-primary);
    font-weight: 600;
}

/* ==========================================
   QUICK ACTIONS (Contact Form style)
   ========================================== */
.dpcw-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dpcw-qa-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s, transform 0.15s;
    border: 1px solid rgba(0,0,0,0.04);
}

.dpcw-qa-item:hover {
    background: rgba(99,102,241,0.04);
    transform: translateX(4px);
}

.dpcw-qa-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99,102,241,0.08);
    flex-shrink: 0;
    transition: transform 0.2s;
}

.dpcw-qa-item:hover .dpcw-qa-icon {
    transform: scale(1.08);
}

.dpcw-qa-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dpcw-qa-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--dpc-text-primary);
}

.dpcw-qa-desc {
    font-size: 11px;
    color: var(--dpc-text-muted);
}

.dpcw-qa-arrow {
    color: var(--dpc-text-muted);
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    transform: translateX(-4px);
}

.dpcw-qa-item:hover .dpcw-qa-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ==========================================
   FANCY ICONS (Hover Effects)
   ========================================== */
.dpcw-fancy-icons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 600px) {
    .dpcw-fancy-icons {
        grid-template-columns: repeat(2, 1fr);
    }
}

.dpcw-fi-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 10px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: default;
}

.dpcw-fi-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.03);
    transition: all 0.35s ease;
    position: relative;
}

/* Effect: Grow */
.dpcw-fi-grow:hover .dpcw-fi-icon {
    transform: scale(1.18);
    background: rgba(99,102,241,0.1);
}

/* Effect: Shadow Pulse */
.dpcw-fi-pulse:hover .dpcw-fi-icon {
    animation: dpcw-shadow-pulse 1.2s ease infinite;
}

@keyframes dpcw-shadow-pulse {
    0%  { box-shadow: 0 0 0 0 rgba(245,158,11,0.35); }
    70% { box-shadow: 0 0 0 14px rgba(245,158,11,0); }
    100%{ box-shadow: 0 0 0 0 rgba(245,158,11,0); }
}

/* Effect: Gradient Ring */
.dpcw-fi-ring .dpcw-fi-icon::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 3px solid transparent;
    transition: border-color 0.35s;
}

.dpcw-fi-ring:hover .dpcw-fi-icon::after {
    border-image: linear-gradient(135deg, #22c55e, #0ea5e9, #a855f7) 1;
    border-image-slice: 1;
    border-radius: 50%;
    /* fallback for rounded borders */
    border-color: #22c55e;
}

.dpcw-fi-val {
    font-size: 20px;
    font-weight: 700;
    color: var(--dpc-text-primary);
}

.dpcw-fi-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--dpc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================
   ICON BOX (Feature Highlights)
   ========================================== */
.dpcw-icon-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

@media (max-width: 600px) {
    .dpcw-icon-box {
        grid-template-columns: 1fr;
    }
}

.dpcw-ib-card {
    text-align: center;
    padding: 24px 16px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.dpcw-ib-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.dpcw-ib-icon {
    margin-bottom: 12px;
    transition: transform 0.5s;
}

.dpcw-ib-card:hover .dpcw-ib-icon {
    transform: rotateY(180deg);
}

.dpcw-ib-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--dpc-text-primary);
}

.dpcw-ib-desc {
    font-size: 12px;
    line-height: 1.6;
    color: var(--dpc-text-muted);
    margin: 0;
}

.dpcw-ib-border {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    transition: width 0.4s ease;
}

.dpcw-ib-card:hover .dpcw-ib-border {
    width: 100%;
}

/* ==========================================
   SUBSCRIPTION CARD (Split Layout)
   ========================================== */
.dpcw-sub-card {
    display: flex;
    border-radius: 12px;
    overflow: hidden;
    min-height: 220px;
}

@media (max-width: 600px) {
    .dpcw-sub-card {
        flex-direction: column;
    }
}

.dpcw-sc-left {
    flex: 0 0 42%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.dpcw-sc-left::before {
    content: '';
    position: absolute;
    width: 180px;
    height: 180px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    top: -40px;
    right: -40px;
}

.dpcw-sc-left-inner {
    position: relative;
    z-index: 1;
    text-align: center;
}

.dpcw-sc-badge {
    display: inline-block;
    padding: 3px 14px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
}

.dpcw-sc-plan {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px;
}

.dpcw-sc-tagline {
    font-size: 12px;
    opacity: 0.8;
    margin: 0 0 16px;
}

.dpcw-sc-left-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dpcw-sc-stat-num {
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
}

.dpcw-sc-stat-label {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 4px;
}

.dpcw-sc-right {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dpcw-sc-right-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    color: var(--dpc-text-primary);
}

.dpcw-sc-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.dpcw-sc-detail-label {
    font-size: 12px;
    color: var(--dpc-text-muted);
}

.dpcw-sc-detail-val {
    font-size: 13px;
    font-weight: 600;
    color: var(--dpc-text-primary);
}

.dpcw-sc-status-active,
.dpcw-sc-status-premium,
.dpcw-sc-status-vip {
    color: #22c55e !important;
}

.dpcw-sc-status-free {
    color: var(--dpc-text-muted) !important;
}

.dpcw-sc-status-basic {
    color: #f59e0b !important;
}

.dpcw-sc-actions {
    margin-top: auto;
    padding-top: 8px;
}

.dpcw-sc-btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: transform 0.15s, box-shadow 0.2s;
}

.dpcw-sc-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}

.dpcw-sc-btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
}

/* ==========================================
   PROFILE CARD
   ========================================== */
.dpcw-profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.dpcw-pc-header {
    width: 100%;
    height: 90px;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    position: relative;
}

.dpcw-pc-header-bg {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e11d48, #f59e0b, #6366f1);
    background-size: 200% 200%;
    animation: dpcw-gradient-shift 6s ease infinite;
}

@keyframes dpcw-gradient-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.dpcw-pc-avatar {
    margin-top: -50px;
    position: relative;
    z-index: 2;
}

.dpcw-pc-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid var(--dpc-surface, #fff);
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.dpcw-pc-body {
    padding: 12px 16px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.dpcw-pc-name {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    color: var(--dpc-text-primary);
}

.dpcw-pc-type {
    display: inline-block;
    padding: 3px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(168,85,247,0.1));
    color: var(--dpc-primary);
}

.dpcw-pc-stats {
    display: flex;
    gap: 24px;
    margin-top: 8px;
}

.dpcw-pc-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dpcw-pc-stat-val {
    font-size: 20px;
    font-weight: 700;
    color: var(--dpc-text-primary);
}

.dpcw-pc-stat-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--dpc-text-muted);
}

.dpcw-pc-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 6px;
}

.dpcw-pc-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--dpc-text-muted);
}

.dpcw-pc-meta-item svg {
    opacity: 0.5;
}
