/* overview-dashboard.css — Overview home for creators and the administrator */
.ov { display: flex; flex-direction: column; gap: 18px; }
.ov.is-loading { opacity: .85; }
.ov-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ov-hello { margin: 0; font-size: 15px; color: #475569; }
.ov-head h1 { margin: 0 0 4px; font-size: 28px; line-height: 1.15; letter-spacing: -.01em; }
.ov-head .muted { margin: 0; font-size: 13px; }
.ov-range { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ov-select { display: inline-flex; align-items: center; gap: 8px; padding: 0 10px; height: 38px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; font-weight: 600; font-size: 13px; }
.ov-select .icon { width: 16px; height: 16px; color: #64748b; }
.ov-select select { border: 0; background: transparent; font: inherit; font-weight: 600; color: inherit; outline: none; }
.ov-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 10px; background: #fff; border: 1px solid #e2e8f0; }
.ov-seg button { border: 0; background: transparent; padding: 6px 10px; border-radius: 7px; font: inherit; font-size: 12px; font-weight: 600; color: #475569; cursor: pointer; }
.ov-seg button.on { background: #0f2444; color: #fff; }

/* stat cards */
.ov-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ov-stat { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 18px 18px 16px; border-radius: 16px; border: 1px solid transparent; min-height: 112px; }
.ov-stat.green { background: #ecfdf5; border-color: #d1fae5; }
.ov-stat.blue { background: #eff6ff; border-color: #dbeafe; }
.ov-stat.purple { background: #f5f3ff; border-color: #ede9fe; }
.ov-stat.orange { background: #fff7ed; border-color: #ffedd5; }
.ov-stat-icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.ov-stat-icon .icon { width: 24px; height: 24px; }
.green .ov-stat-icon { background: #22c55e; }
.blue .ov-stat-icon { background: #3b82f6; }
.purple .ov-stat-icon { background: #8b5cf6; }
.orange .ov-stat-icon { background: #f97316; }
.ov-stat-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ov-stat-label { font-size: 13px; font-weight: 600; color: #334155; white-space: nowrap; }
.ov-stat-value { font-size: 28px; line-height: 1.1; letter-spacing: -.02em; color: #0f172a; }
.ov-stat-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-top: 4px; padding-right: 84px; }
.ov-stat-foot .small { font-size: 11px; }
.ov-delta { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.ov-delta.up { color: #15803d; background: #dcfce7; }
.ov-delta.down { color: #b91c1c; background: #fee2e2; }
.ov-delta.flat { color: #64748b; background: #f1f5f9; }
.ov-stat-chart { position: absolute; right: 16px; bottom: 14px; width: 78px; height: 44px; }
.ov-spark { width: 100%; height: 100%; display: block; }

/* panels */
.ov-panel { background: #fff; border: 1px solid #e6ebf2; border-radius: 16px; padding: 18px 20px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); min-width: 0; }
.ov-panel-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.ov-panel-head h3 { white-space: nowrap; }
.ov-panel-head h3 { margin: 0; font-size: 16px; }
.ov-panel-head p { margin: 2px 0 0; }
.ov-panel-right { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.ov-panel-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.ov-panel-icon .icon { width: 20px; height: 20px; }
.ov-panel-icon.gold { background: #fef3c7; color: #d97706; }
.ov-panel-icon.blue { background: #dbeafe; color: #2563eb; }
.ov-panel-icon.purple { background: #ede9fe; color: #7c3aed; }
.ov-panel-icon.orange { background: #ffedd5; color: #ea580c; }
.ov-panel-icon.red { background: #fee2e2; color: #dc2626; }
.ov-pill { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border: 1px solid #e2e8f0; border-radius: 9px; font-size: 12px; font-weight: 600; background: #fff; }
.ov-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #475569; }
.ov-legend i, .ov-legend-list i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.ov-chart { width: 100%; height: 260px; display: block; }
.ov-tick { font-size: 11px; fill: #64748b; font-family: inherit; }
.ov-row-2 { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 16px; }
.ov-row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ov-empty { position: relative; }
.ov-empty > p { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; color: #64748b; font-size: 13px; background: linear-gradient(180deg, rgba(255,255,255,.4), rgba(255,255,255,.85)); border-radius: 10px; }
.ov-empty.small { padding: 28px 10px; text-align: center; color: #64748b; font-size: 13px; }
.ov-empty.small p { position: static; background: none; }

/* donut */
.ov-donut-wrap { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: center; }
.ov-donut { width: 150px; height: 150px; }
.ov-donut-n { font-size: 24px; font-weight: 800; fill: #0f172a; font-family: inherit; }
.ov-donut-l { font-size: 9px; fill: #64748b; font-family: inherit; }
.ov-legend-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ov-legend-list li { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.ov-legend-list li strong { margin-left: auto; }

/* top courses */
.ov-top { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ov-top li { display: flex; align-items: center; gap: 10px; }
.ov-rank { width: 18px; font-size: 12px; font-weight: 700; color: #64748b; text-align: center; }
.ov-thumb { width: 38px; height: 30px; border-radius: 7px; background: #f1f5f9 center/cover no-repeat; display: grid; place-items: center; color: #94a3b8; flex: none; }
.ov-thumb .icon { width: 16px; height: 16px; }
.ov-top-body { display: flex; flex-direction: column; min-width: 0; }
.ov-top-body strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-top-rev { margin-left: auto; color: #15803d; font-size: 13px; white-space: nowrap; }

/* events */
.ov-events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ov-events li { display: flex; align-items: center; gap: 12px; }
.ov-date { width: 44px; height: 48px; border-radius: 10px; border: 1px solid #fecaca; background: #fff5f5; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; flex: none; }
.ov-date b { font-size: 9px; letter-spacing: .08em; color: #dc2626; text-transform: uppercase; }
.ov-date strong { font-size: 18px; color: #0f172a; margin-top: 2px; }
.ov-ev-body { display: flex; flex-direction: column; min-width: 0; }
.ov-ev-body strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-tag { margin-left: auto; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #f1f5f9; color: #475569; text-decoration: none; white-space: nowrap; }
.ov-tag.green { background: #dcfce7; color: #15803d; }
.ov-tag.blue { background: #dbeafe; color: #1d4ed8; }

/* loading skeleton */
.ov-skel { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ov-skel div { height: 108px; border-radius: 16px; background: linear-gradient(90deg, #f1f5f9, #f8fafc, #f1f5f9); background-size: 200% 100%; animation: ovShimmer 1.2s infinite; }
@keyframes ovShimmer { to { background-position: -200% 0; } }

@media (max-width: 1200px) { .ov-stats { grid-template-columns: repeat(2, 1fr); } .ov-row-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) { .ov-row-2, .ov-row-3 { grid-template-columns: 1fr; } .ov-chart { height: 220px; } }
@media (max-width: 640px) { .ov-stats, .ov-skel { grid-template-columns: 1fr; } .ov-seg { display: none; } .ov-head h1 { font-size: 24px; } .ov-donut-wrap { grid-template-columns: 1fr; justify-items: center; } }
.ov-other { display: block; font-size: 11px; font-weight: 600; color: #475569; letter-spacing: 0; }

.ov-export { display: flex; gap: 6px; }
.ov-export .btn { gap: 4px; }
