/* RMC Manager - the director dashboard, more modern (v115).  Modelled on a dashboard picture Gavin sent: a pale cool-grey page, white cards with a
   dark title bar, big numbers with a coloured icon square, a ring for the score, a small month calendar, and a profile block at the top of the menu.
   Loaded AFTER styles.css, v113-rudo-theme.css and v114-sidebar.css; the drawing and extra cards come from v115-dashboard.js.  To switch it all off,
   remove the v115 lines from index.html.  Everything here is scoped to #director-home (and the profile block), so no other page changes. */

:root { --bg: #e9eff1; --bar: #16253b; }

/* ---- dark title bars on the dashboard's cards ----------------------------------------------------------------------------------------------- */
#director-home .card { overflow: hidden; }
#director-home .card > h3:first-child, #director-home .card > .row-between:first-child, #director-home .metric-card > .metric-label {
  margin: -18px -18px 14px; padding: 10px 18px; background: var(--bar); color: #fff; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 12.5px; font-weight: 700; letter-spacing: .03em;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; text-transform: none; }
#director-home .card > .row-between:first-child h3 { margin: 0; color: #fff; font-size: 12.5px; font-weight: 700; letter-spacing: .03em; }
#director-home .card > h3:first-child::after, #director-home .card > .row-between:first-child h3::after { content: none; }
#director-home .card > .row-between:first-child .btn { background: rgba(255, 255, 255, .14); color: #fff; padding: 4px 12px; font-size: 11.5px; border-radius: 999px; }
#director-home .card > .row-between:first-child .btn:hover { background: var(--coral); color: #fff; }

/* ---- the stat band becomes four white cards ------------------------------------------------------------------------------------------------- */
#director-home .stat-band { background: none !important; box-shadow: none; padding: 0; overflow: visible; text-align: left; color: var(--ink); gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); border-radius: 0; isolation: auto; }
#director-home .stat-band::before, #director-home .stat-band::after { content: none; }
#director-home .stat-band > button { position: relative; display: flex; flex-direction: column-reverse; justify-content: flex-end; min-height: 138px; padding: 0; border-radius: 20px; overflow: hidden;
  background: #fff; color: var(--ink); text-align: left; box-shadow: 0 1px 0 rgba(10, 35, 66, .05); }
#director-home .stat-band > button:hover, #director-home .stat-band > button:focus-visible { background: #fff; box-shadow: 0 10px 26px rgba(10, 35, 66, .12); }
#director-home .stat-band .stat-lbl { margin: 0; padding: 10px 18px; background: var(--bar); color: #fff; opacity: 1; font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
#director-home .stat-band .stat-num { padding: 18px 18px 22px; font-family: 'Poppins', sans-serif; font-size: 46px; font-weight: 800; letter-spacing: -.045em; line-height: 1; color: var(--ink); }
/* the icon square, bottom right */
#director-home .stat-band > button::after { content: ''; position: absolute; right: 16px; bottom: 18px; width: 52px; height: 52px; border-radius: 14px; background-color: var(--coral); background-repeat: no-repeat; background-position: center; background-size: 26px; }
#director-home .stat-band > button:nth-child(1)::after { background-image: var(--ic-building); }
#director-home .stat-band > button:nth-child(3)::after { background-image: var(--ic-wrench); }
#director-home .stat-band > button:nth-child(4)::after { background-image: var(--ic-check); }
/* the ring: the second button is the compliance score */
#director-home .stat-band > button:nth-child(2)::after { content: none; }
#director-home .stat-band > button:nth-child(2) .stat-num { isolation: isolate; position: relative; width: 104px; height: 104px; margin: 14px 18px 16px auto; padding: 0; border-radius: 50%; display: grid; place-items: center;
  font-size: 25px; background: conic-gradient(var(--ring, var(--coral)) calc(var(--pct, 0) * 1%), #e5eaef 0); }
#director-home .stat-band > button:nth-child(2) .stat-num::before { content: ''; position: absolute; inset: 11px; border-radius: 50%; background: #fff; z-index: -1; }
#director-home .stat-band > button:nth-child(2) { min-height: 0; }

/* ---- the four smaller number cards ----------------------------------------------------------------------------------------------------------- */
#director-home .metric-card > .metric-label { align-self: stretch; text-transform: capitalize; }
#director-home .metric-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 18px; text-align: left; }
#director-home .metric-card .metric { font-family: 'Poppins', sans-serif; font-size: 40px; font-weight: 800; letter-spacing: -.045em; line-height: 1; color: var(--ink); margin: 4px 0 6px; }
#director-home .metric-card::after { content: ''; position: absolute; right: 16px; bottom: 16px; width: 44px; height: 44px; border-radius: 12px; background-color: var(--navy); background-repeat: no-repeat; background-position: center; background-size: 22px; background-image: var(--ic-check); }
#director-home .metric-card[data-show="fire-doors"]::after, #director-home .metric-card[data-show^="fire"]::after { background-image: var(--ic-flame); background-color: var(--coral); }
#director-home .metric-card[data-show="service-charges"]::after, #director-home .metric-card[data-show*="finance"]::after { background-image: var(--ic-coin); }
#director-home .metric-card[data-show="risk-actions"]::after { background-image: var(--ic-alert); background-color: #d98a00; }

/* ---- the new row: repairs by priority, and the month calendar ------------------------------------------------------------------------------- */
.v115-row { display: grid; grid-template-columns: 1.1fr 1fr; gap: 14px; margin-top: 14px; }
@media (max-width: 900px) { .v115-row { grid-template-columns: 1fr; } }
.v115-card { padding: 18px; }
.v115-bar { display: grid; grid-template-columns: 82px 1fr 30px; align-items: center; gap: 10px; margin: 11px 0; font-size: 13.5px; }
.v115-bar-name { font-weight: 700; color: #3b475c; }
.v115-bar-track { height: 12px; border-radius: 999px; background: #e7ecf1; overflow: hidden; }
.v115-bar-fill { display: block; height: 100%; border-radius: 999px; min-width: 4px; }
.v115-bar-n { text-align: right; font-family: 'Poppins', sans-serif; font-weight: 800; }
.v115-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.v115-dow { font-size: 11px; font-weight: 800; color: #8592a6; padding: 4px 0; letter-spacing: .05em; }
.v115-day { position: relative; font-size: 13px; font-weight: 600; padding: 7px 0; border-radius: 10px; color: #3b475c; }
.v115-blank { visibility: hidden; }
.v115-has::after { content: ''; position: absolute; left: 50%; bottom: 2px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--navy); }
.v115-today { background: var(--coral); color: #fff; font-weight: 800; }
.v115-today.v115-has::after { background: #fff; }
.v115-nexts { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.v115-next { display: flex; gap: 10px; align-items: baseline; width: 100%; text-align: left; border: 0; background: transparent; padding: 5px 4px; border-radius: 8px; cursor: pointer; font: inherit; color: var(--ink); }
.v115-next:hover { background: #f1f5f8; }
.v115-next b { flex: 0 0 52px; font-family: 'Poppins', sans-serif; font-size: 12.5px; color: var(--coral); }
.v115-next span { font-size: 13px; }

/* ---- the dashboard's lower cards ------------------------------------------------------------------------------------------------------------ */
#director-home .v11-dashboard-grid { margin-top: 14px; }
#director-home .v11-quick-grid .btn { border-radius: 14px; }

@media (max-width: 760px) { .v115-bar { grid-template-columns: 74px 1fr 26px; } #director-home .stat-band { grid-template-columns: 1fr 1fr; } #director-home .stat-band .stat-num { font-size: 36px; } }

/* ---- the little white line icons used above (inline pictures, so there is nothing extra to load) ------------------------------------------- */
:root {
  --ic-building: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='3' width='14' height='18' rx='1'/%3E%3Cpath d='M9 7h2M13 7h2M9 11h2M13 11h2M9 15h2M13 15h2'/%3E%3Cpath d='M10 21v-3h4v3'/%3E%3C/svg%3E");
  --ic-wrench: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a4 4 0 0 0-5.4 5.4L3 18v3h3l6.3-6.3a4 4 0 0 0 5.4-5.4l-2.6 2.6-2.4-.6-.6-2.4z'/%3E%3C/svg%3E");
  --ic-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='4' width='14' height='17' rx='2'/%3E%3Cpath d='M9 4h6v3H9z'/%3E%3Cpath d='M9 14l2 2 4-4'/%3E%3C/svg%3E");
  --ic-flame: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3c1 3.5 5 5 5 10a5 5 0 0 1-10 0c0-2.5 1.2-3.5 2-5 .6 1.2 1.2 1.7 2 1.7C11.5 8.5 11 6 12 3z'/%3E%3C/svg%3E");
  --ic-coin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M14.5 8.5c-.6-.8-1.5-1.2-2.6-1.2-1.7 0-2.9 1.1-2.9 2.8 0 2.8 1 3.4.5 6.2h5.5M8.5 12.5h5'/%3E%3C/svg%3E");
  --ic-alert: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l10 18H2z'/%3E%3Cpath d='M12 10v5M12 18v.5'/%3E%3C/svg%3E");
}
