/* ============================================================
   ADS styles - Core: dashboard glassmorphism theme
   Split out of the former monolithic style.css WITHOUT code changes.
   Files are linked in numeric order (see Core/templates/_styles.html) so
   the cascade is identical to the old single file.
   ============================================================ */

/* ============================================================
   Dashboard glassmorphism theme — scoped entirely to #page-dashboard
   so no other screen (Timesheet, Leave, Expenses, etc.) is affected.
   Adds a soft gradient wallpaper behind the page and turns the
   dashboard's cards into frosted-glass panels sitting on top of it.
   ============================================================ */
#page-dashboard {
    position: relative;
}
#page-dashboard .page-body {
    position: relative;
    z-index: 1;
    border-radius: 20px;
}
#page-dashboard::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(620px 420px at 8% 0%,   rgba(22,163,74,0.16), transparent 60%),
        radial-gradient(560px 420px at 96% 10%, rgba(124,58,237,0.14), transparent 60%),
        radial-gradient(680px 520px at 40% 100%, rgba(37,99,235,0.10), transparent 60%),
        linear-gradient(180deg, #f4f7f9 0%, #eef1f5 100%);
    pointer-events: none;
}

/* Frosted-glass surface applied to every dashboard card/panel */
#page-dashboard .ts-card,
#page-dashboard .stat-card {
    background: rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 8px 28px -8px rgba(15, 23, 42, 0.14), inset 0 1px 0 rgba(255,255,255,0.5);
}

/* Inner surfaces (table wraps, filter rows, headers) get a lighter glass
   tint so text stays readable against the wallpaper without looking like
   a flat white box dropped onto frosted glass. */
#page-dashboard .section-header,
#page-dashboard .ticket-filters-row,
#page-dashboard .tickets-table thead th,
#page-dashboard .lcal-footer {
    background: rgba(255, 255, 255, 0.38);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
#page-dashboard .tickets-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.55);
}
#page-dashboard .lcal-main {
    background: transparent;
}
#page-dashboard .leave-calendar-grid .lcal-cell:hover {
    background: rgba(255, 255, 255, 0.7) !important;
}
#page-dashboard .dash-exceptions-banner {
    background: rgba(254, 242, 242, 0.68);
}
#page-dashboard .dash-exceptions-banner .ticket-filters-row,
#page-dashboard .dash-exceptions-banner .timesheet-table-wrap,
#page-dashboard .dash-exceptions-banner #dash-exceptions-grouped {
    background: rgba(255, 255, 255, 0.55);
}

/* -- Issue / stat cards: refined for the glass theme -- */
#page-dashboard .stat-card {
    border-radius: 16px;
    padding: 16px 18px;
    border-left: 3px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
#page-dashboard .stat-card-blue   { border-left-color: rgba(37,99,235,0.55); }
#page-dashboard .stat-card-yellow { border-left-color: rgba(217,119,6,0.55); }
#page-dashboard .stat-card-green  { border-left-color: rgba(22,163,74,0.55); }
#page-dashboard .stat-card-purple { border-left-color: rgba(124,58,237,0.55); }
#page-dashboard .stat-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 14px 32px -10px rgba(15, 23, 42, 0.22), inset 0 1px 0 rgba(255,255,255,0.6);
}
#page-dashboard .stat-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    font-size: 16px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}
#page-dashboard .stat-card-blue   .stat-card-icon { background: linear-gradient(150deg, rgba(37,99,235,0.18), rgba(37,99,235,0.08)); }
#page-dashboard .stat-card-yellow .stat-card-icon { background: linear-gradient(150deg, rgba(217,119,6,0.20), rgba(217,119,6,0.08)); }
#page-dashboard .stat-card-green  .stat-card-icon { background: linear-gradient(150deg, rgba(22,163,74,0.20), rgba(22,163,74,0.08)); }
#page-dashboard .stat-card-purple .stat-card-icon { background: linear-gradient(150deg, rgba(124,58,237,0.20), rgba(124,58,237,0.08)); }
#page-dashboard .stat-card-num {
    font-size: 27px;
    letter-spacing: -0.5px;
}
#page-dashboard .stat-card-label {
    color: var(--gray-600);
}

#page-dashboard .stat-repo-count {
    background: rgba(124,58,237,0.14);
}
/* The Closed card's own breakdown numbers should stay plain text with
   no pill background — override the glass-theme tint above, which
   otherwise wins the cascade and shows as a translucent smudge behind
   the Label Closed / Fully Closed figures. */
#page-dashboard #stat-closed .stat-repo-count {
    background: none;
}

@media (max-width: 640px) {
    #page-dashboard::before { background: linear-gradient(180deg, #f4f7f9 0%, #eef1f5 100%); }
}
