/* ================================================================
   Dashboard "Quick Access" widgets — Surveys, Forms, Events,
   Documents, Quick Tasks. Complements Dashboard.razor.css.
   ================================================================ */

.dash-widget-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dash-widget-link {
    display: block;
    color: inherit;
}

.dash-widget {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    border-radius: 0.75rem;
    overflow: hidden;
}

.dash-widget:hover {
    box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-2px);
}

.dash-widget-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    flex-shrink: 0;
}

.dash-widget-icon-wrap i {
    font-size: 1.35rem;
}

.dash-widget-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary, #6c757d);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.dash-widget-count {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text, inherit);
    line-height: 1.1;
}

/* Completion ring */
.dash-widget-ring {
    position: relative;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
}

.dash-widget-ring-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.dash-widget-ring-bg {
    fill: none;
    stroke: rgba(0, 0, 0, 0.08);
    stroke-width: 3.6;
}

.dash-widget-ring-fg {
    fill: none;
    stroke-width: 3.6;
    stroke-linecap: round;
    transition: stroke-dasharray 0.4s ease;
}

.dash-widget-ring-fg--primary { stroke: #0d6efd; }
.dash-widget-ring-fg--success { stroke: #198754; }
.dash-widget-ring-fg--warning { stroke: #ffc107; }
.dash-widget-ring-fg--info    { stroke: #0dcaf0; }
.dash-widget-ring-fg--danger  { stroke: #dc3545; }
.dash-widget-ring-fg--purple  { stroke: #6f42c1; }
.dash-widget-ring-fg--orange  { stroke: #fd7e14; }

.dash-widget-ring-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
}

/* Sparkline */
.dash-widget-sparkline {
    margin: 0.5rem 0 0.6rem;
}

.dash-widget-sparkline-svg {
    width: 100%;
    height: 28px;
    display: block;
}

.dash-widget-sparkline-line {
    fill: none;
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

.dash-widget-sparkline-line--primary { stroke: #0d6efd; }
.dash-widget-sparkline-line--success { stroke: #198754; }
.dash-widget-sparkline-line--warning { stroke: #ffc107; }
.dash-widget-sparkline-line--info    { stroke: #0dcaf0; }
.dash-widget-sparkline-line--danger  { stroke: #dc3545; }
.dash-widget-sparkline-line--purple  { stroke: #6f42c1; }
.dash-widget-sparkline-line--orange  { stroke: #fd7e14; }

.dash-widget-sparkline-label {
    display: none; /* visual chart is enough; kept for a11y via title attr on ring */
}

/* Recent items list */
.dash-widget-recent {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dash-widget-recent-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.78rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding-top: 0.25rem;
}

.dash-widget-recent-item:first-child {
    border-top: none;
    padding-top: 0;
}

.dash-widget-recent-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text, inherit);
}

.dash-widget-recent-date {
    flex-shrink: 0;
    color: var(--text-secondary, #8e8e93);
}

.dash-widget-empty {
    padding-top: 0.25rem;
}

/* Accent bg utilities reused by widget icon wrap for colours not already covered
   by Bootstrap (purple/orange) — matches Dashboard.razor.css conventions. */
.bg-purple.bg-opacity-10 { background-color: rgba(111, 66, 193, 0.1) !important; }
.bg-orange.bg-opacity-10 { background-color: rgba(253, 126, 20, 0.1) !important; }

/* ================================================================
   Upcoming Events widget
   ================================================================ */

.dash-upcoming-events-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dash-upcoming-events-item a {
    color: inherit;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.15s ease;
}

.dash-upcoming-events-item a:hover {
    background-color: rgba(111, 66, 193, 0.06);
}

.dash-upcoming-events-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background-color: rgba(111, 66, 193, 0.1);
    flex-shrink: 0;
    line-height: 1;
}

.dash-upcoming-events-day {
    font-size: 1rem;
    font-weight: 700;
    color: #6f42c1;
}

.dash-upcoming-events-month {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #6f42c1;
}

.dash-upcoming-events-title {
    font-size: 0.9rem;
    font-weight: 600;
}

