/* ==========================================================================
   Kumar Dairy — extra polish layered on top of rb-theme.css
   Loaded AFTER rb-theme.css so these rules win the cascade.
   ========================================================================== */

/* Legacy pages used inline blue header strips (background #1e88e5) —
   restyle them to the new corporate blue toolbar look without touching markup. */
.card-body[style*="1e88e5"] {
    background: linear-gradient(120deg, #075985 0%, #0369a1 100%) !important;
    padding: 0.7rem 1rem !important;
    border-radius: 14px 14px 0 0;
}
.card-body[style*="1e88e5"] h4,
.card-body[style*="1e88e5"] .card-title {
    color: #fff !important;
}

/* Legacy dashboard "round" icon tiles used by sub-home pages */
.round.round-lg {
    border-radius: 14px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.round.round-lg i {
    line-height: 1;
}

/* Icon fonts (mdi / ti / fa) inside the new rb components */
.rb-nav-link i,
.rb-dd-item i,
.rb-quick i,
.rb-stat i {
    font-style: normal;
}
.rb-nav-link i {
    width: 18px;
    font-size: 17px;
    color: var(--rb-muted);
    flex: 0 0 auto;
    text-align: center;
}
.rb-nav-link.active i { color: #fff; }
.rb-dropdown .rb-dd-item i {
    width: 16px;
    font-size: 14.5px;
    color: var(--rb-muted);
    text-align: center;
}
.rb-quick-icon i,
.rb-stat-icon i {
    color: #fff;
    font-size: 20px;
    line-height: 1;
}
.rb-quick-icon .mdi,
.rb-stat-icon .mdi {
    font-size: 22px;
}

.rb-user-role {
    text-transform: capitalize;
}

.rb-footer a {
    font-weight: 600;
}

/* Legacy content wrapper (.page-wrapper) lives inside the new .rb-main
   area now — neutralise the old fixed-sidebar offsets from style.min.css. */
.rb-main .page-wrapper {
    position: relative;
    display: block;
    background: transparent;
    margin-left: 0 !important;
    padding-top: 0 !important;
    min-height: 0 !important;
    transition: none;
}
.rb-main .page-wrapper > .container-fluid {
    padding: 0;
    min-height: 0;
}

/* Link tiles inside the new dashboard keep their own text colours */
a.rb-stat,
a.rb-quick {
    color: inherit;
    text-decoration: none;
}
.rb-stat .rb-stat-lbl { color: #475569; }
.rb-stat .rb-stat-sub { display: block; }

.rb-quick {
    width: 100%;
    height: 100%;
    margin-bottom: 14px;
}

/* ==========================================================================
   2026 Dashboard (Home.aspx)
   ========================================================================== */

/* Live clock in the hero */
.rb-clock {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

/* 14-day present chart */
.rb-days {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding-top: 4px;
}
.rb-day {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 0;
}
.rb-day-val {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--rb-text);
    line-height: 1.1;
    min-height: 16px;
}
.rb-day-track {
    width: 100%;
    max-width: 34px;
    height: 150px;
    background: #eef1f5;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}
.rb-day-bar {
    display: block;
    width: 100%;
    background: linear-gradient(180deg, #14b8a6 0%, #0d9488 100%);
    border-radius: 8px 8px 0 0;
    min-height: 3px;
    transition: height .5s ease;
}
.rb-day.is-today .rb-day-track { background: #c7f2ea; }
.rb-day.is-today .rb-day-bar {
    background: linear-gradient(180deg, #0d9488 0%, #0f766e 100%);
}
.rb-day-lbl {
    font-size: 11px;
    color: var(--rb-muted);
    font-weight: 550;
    white-space: nowrap;
}
.rb-day-today {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: .06em;
    color: #fff;
    background: #0d9488;
    padding: 2px 9px;
    border-radius: 999px;
    text-transform: uppercase;
}

/* Feed avatars (palette) */
.rb-av {
    color: #fff;
}
.rb-av-1 { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.rb-av-2 { background: linear-gradient(135deg, #10b981, #059669); }
.rb-av-3 { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.rb-av-4 { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.rb-av-5 { background: linear-gradient(135deg, #f43f5e, #e11d48); }
.rb-av-6 { background: linear-gradient(135deg, #14b8a6, #0d9488); }

@media (max-width: 575.98px) {
    .rb-days { gap: 6px; }
    .rb-day-track { height: 110px; }
    .rb-feed-rt { flex-direction: column; align-items: flex-end; gap: 3px; }
}

/* ==========================================================================
   2026 dashboard (kumarmilk.com) — week chart, donut polish, status pills
   ========================================================================== */

/* 7-day present/absent chart */
.rb-week {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding-top: 6px;
}
.rb-wk-day {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 0;
}
.rb-wk-vals {
    display: flex;
    gap: 8px;
    justify-content: center;
    font-size: 11px;
    font-weight: 750;
    line-height: 1;
    min-height: 12px;
    font-variant-numeric: tabular-nums;
}
.rb-wk-vals .v-p { color: var(--rb-success); }
.rb-wk-vals .v-a { color: var(--rb-danger); }
.rb-wk-track {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    width: 100%;
    max-width: 44px;
    height: 150px;
    background: #eef1f5;
    border-radius: 8px;
    padding: 6px 5px;
}
.rb-wk-day.is-today .rb-wk-track { background: #dcfce7; }
.rb-wk-bar {
    display: block;
    flex: 1 1 0;
    max-width: 13px;
    min-height: 3px;
    border-radius: 6px 6px 0 0;
    transition: height .5s ease;
}
.rb-wk-p { background: linear-gradient(180deg, #4ade80 0%, #059669 100%); }
.rb-wk-a { background: linear-gradient(180deg, #fca5a5 0%, #dc2626 100%); }
.rb-wk-lbl {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--rb-muted);
    white-space: nowrap;
}
.rb-wk-today {
    margin-top: 1px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--rb-success);
    background: var(--rb-success-soft);
    padding: 2px 9px;
    border-radius: 999px;
}

/* Leave status pills */
.rb-time-red { background: #fee2e2; color: #dc2626; }
.rb-time-amber { background: #fef3c7; color: #d97706; }

/* Donut legend tidy on short screens */
.rb-donut-legend { min-width: 0; }

@media (max-width: 575.98px) {
    .rb-week { gap: 5px; }
    .rb-wk-track { height: 110px; }
    .rb-wk-vals { gap: 6px; font-size: 10px; }
}

/* ==========================================================================
   Punch time distribution details (Home.aspx)
   ========================================================================== */
.rb-dist-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.rb-dist-meta .rb-chip {
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
}
.rb-dist-meta .rb-chip b {
    font-weight: 800;
    margin-left: 4px;
}
#dashDist .rb-bar-fill {
    background: linear-gradient(90deg, #0284c7 0%, #7dd3fc 100%);
}
#dashDist .rb-bar-track {
    background: #eef2f7;
}

/* ==========================================================================
   Module Portal heading (Home.aspx)
   ========================================================================== */
.rb-mod-head {
    margin: 4px 0 14px;
}
.rb-mod-head h2 {
    color: #075985;
    font-size: 20px;
    font-weight: 780;
    letter-spacing: -0.01em;
    margin: 0;
}
.rb-mod-head p {
    color: var(--rb-muted);
    font-size: 12.5px;
    margin: 2px 0 0;
}

