/* PacificHub design tokens + the DTMS (Design Team Management System) module.
 *
 * The tokens below (--ph-*) are the new look the whole project is moving
 * towards: dark navy navigation, orange accent, light content surface, white
 * cards. They are defined once here so other screens can adopt them later;
 * everything DTMS-specific is scoped under .dtms so the existing tracker's
 * styles are untouched. */

:root {
  --ph-navy-900: #07142a;
  --ph-navy-800: #0b1e3b;
  --ph-navy-700: #12294d;
  --ph-navy-600: #1b3560;
  --ph-accent: #f26a21;
  --ph-accent-dark: #d4560f;
  --ph-accent-soft: #fff1e8;
  --ph-surface: #eef1f6;
  --ph-card: #ffffff;
  --ph-line: #e3e8ef;
  --ph-text: #1b2840;
  --ph-muted: #6b788f;
  --ph-green: #1b8a3c;
  --ph-green-soft: #e3f6e8;
  --ph-blue: #1f6feb;
  --ph-blue-soft: #e4eefe;
  --ph-red: #d92d20;
  --ph-red-soft: #fde8e6;
  --ph-amber: #b26a00;
  --ph-amber-soft: #fff1d6;
  --ph-radius: 12px;
  --ph-shadow: 0 1px 2px rgba(11, 30, 59, 0.06), 0 4px 14px rgba(11, 30, 59, 0.05);
}

.dtms {
  display: flex;
  width: 100%;
  height: 100vh;
  background: var(--ph-surface);
  color: var(--ph-text);
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  font-size: 14px;
}
.dtms * { box-sizing: border-box; }

/* ---- navigation ---------------------------------------------------------- */
.dtms-nav {
  width: 232px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--ph-navy-800), var(--ph-navy-900));
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 18px 12px;
}
.dtms-brand { padding: 4px 8px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); margin-bottom: 14px; }
.dtms-brand-mark { font-size: 26px; font-weight: 800; letter-spacing: 1px; }
.dtms-brand-mark span { color: var(--ph-accent); }
.dtms-brand-sub { font-size: 9.5px; letter-spacing: 2.2px; color: #9fb0cc; margin-top: 4px; text-transform: uppercase; }
.dtms-nav-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  background: transparent; border: 0; color: #cdd8ea;
  padding: 11px 12px; margin: 2px 0; border-radius: 10px;
  font-size: 14.5px; cursor: pointer;
}
.dtms-nav-item:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.dtms-nav-item.active { background: linear-gradient(90deg, var(--ph-accent), #ff8a3d); color: #fff; font-weight: 600; box-shadow: 0 4px 14px rgba(242, 106, 33, 0.35); }
.dtms-nav-item .ico { width: 20px; text-align: center; font-size: 16px; }
.dtms-nav-badge { margin-left: auto; background: var(--ph-accent); color: #fff; font-size: 11px; border-radius: 10px; padding: 1px 7px; }
.dtms-nav-item.active .dtms-nav-badge { background: #fff; color: var(--ph-accent-dark); }
.dtms-nav-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.dtms-tagline { font-family: "Segoe Script", "Brush Script MT", cursive; color: #8ea2c4; font-size: 15px; line-height: 1.25; margin: 0 4px 14px; }
.dtms-user { display: flex; align-items: center; gap: 10px; color: #fff; }
.dtms-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ph-navy-600); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex-shrink: 0; }
.dtms-user small { display: block; color: #9fb0cc; font-size: 11px; }
.dtms-back { margin-top: 10px; width: 100%; background: transparent; border: 1px solid rgba(255, 255, 255, 0.2); color: #cdd8ea; border-radius: 8px; padding: 7px; cursor: pointer; }
.dtms-back:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

/* ---- page ---------------------------------------------------------------- */
.dtms-main { flex: 1; min-width: 0; overflow-y: auto; padding-bottom: 28px; }
.dtms-hero {
  position: relative; min-height: 140px;
  background:
    linear-gradient(90deg, rgba(7, 20, 42, 0.94) 0%, rgba(11, 30, 59, 0.82) 38%, rgba(11, 30, 59, 0.1) 78%),
    url(/dtms/hero.jpg) center 64% / cover no-repeat,
    linear-gradient(120deg, var(--ph-navy-700) 0%, #26436f 55%, #c9703a 130%);
  color: #fff; padding: 22px 28px; overflow: hidden;
}
.dtms-hero h1 { margin: 0; font-size: 26px; font-weight: 700; }
.dtms-hero p { margin: 4px 0 0; color: #d6e0f0; }
.dtms-body { padding: 0 24px; }

.dtms-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) 200px; gap: 14px; margin: -26px 0 18px; position: relative; z-index: 2; }
.dtms-card { background: var(--ph-card); border-radius: var(--ph-radius); box-shadow: var(--ph-shadow); padding: 14px 16px; }
.dtms-stat { display: flex; gap: 12px; align-items: center; }
.dtms-stat-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; flex-shrink: 0; }
.dtms-stat b { display: block; font-size: 28px; line-height: 1; font-weight: 700; }
.dtms-stat span { display: block; color: var(--ph-text); font-size: 14px; margin-top: 2px; }
.dtms-stat small { color: var(--ph-muted); font-size: 12px; }
.dtms-clock { background: var(--ph-navy-800); color: #fff; text-align: center; display: flex; flex-direction: column; justify-content: center; }
.dtms-clock small { color: #9fb0cc; letter-spacing: 1px; }
.dtms-clock b { font-size: 30px; margin-top: 4px; }

.dtms-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.dtms-panel { background: var(--ph-card); border-radius: var(--ph-radius); box-shadow: var(--ph-shadow); padding: 16px 18px; margin-bottom: 16px; }
.dtms-panel-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.dtms-panel-head h2 { margin: 0; font-size: 19px; }
.dtms-panel-head p { margin: 2px 0 0; color: var(--ph-muted); font-size: 12.5px; }
.dtms-panel-head .spacer { flex: 1; }

/* ---- controls ------------------------------------------------------------ */
.dtms input[type="text"], .dtms input[type="date"], .dtms input[type="number"], .dtms input[type="time"], .dtms select, .dtms textarea {
  border: 1px solid var(--ph-line); border-radius: 8px; padding: 7px 10px; font: inherit; color: var(--ph-text); background: #fff; max-width: 100%;
  width: auto; margin: 0; box-sizing: border-box;
}
.dtms textarea { width: 100%; min-height: 72px; resize: vertical; margin: 0; }
.dtms input:focus, .dtms select:focus, .dtms textarea:focus { outline: 2px solid rgba(242, 106, 33, 0.35); border-color: var(--ph-accent); }
.dtms-btn { border: 1px solid var(--ph-line); background: #fff; color: var(--ph-text); border-radius: 8px; padding: 7px 14px; cursor: pointer; font: inherit; }
.dtms-btn:hover { background: #f6f8fb; }
.dtms-btn.primary { background: var(--ph-accent); border-color: var(--ph-accent); color: #fff; font-weight: 600; }
.dtms-btn.primary:hover { background: var(--ph-accent-dark); }
.dtms-btn.danger { color: var(--ph-red); border-color: #f3c7c3; }
.dtms-btn.small { padding: 4px 9px; font-size: 12.5px; }
.dtms-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.dtms-btn.wide { width: 100%; padding: 12px; font-size: 15px; }
.dtms-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--ph-line); margin-bottom: 10px; flex-wrap: wrap; }
.dtms-tab { background: none; border: 0; padding: 8px 12px; color: var(--ph-muted); cursor: pointer; border-bottom: 2px solid transparent; font: inherit; }
.dtms-tab.active { color: var(--ph-text); font-weight: 600; border-bottom-color: var(--ph-accent); }

/* ---- chips --------------------------------------------------------------- */
.dtms-chip { display: inline-block; padding: 2px 9px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.4px; white-space: nowrap; background: #eef1f6; color: #44546f; }
.chip-ACTIVE { background: var(--ph-green-soft); color: var(--ph-green); }
.chip-IN_PROGRESS { background: var(--ph-blue-soft); color: var(--ph-blue); }
.chip-BLOCKED { background: var(--ph-red-soft); color: var(--ph-red); }
.chip-COMPLETED { background: #dff1ff; color: #0b6bb3; }
.chip-ARCHIVED, .chip-CLOSED { background: #eceff3; color: #5a6679; }
.chip-DELETED, .chip-REJECTED { background: #f2d9d6; color: #8c2a20; }
.chip-PENDING_APPROVAL, .chip-SUBMITTED, .chip-MORE_INFO_REQUIRED { background: var(--ph-amber-soft); color: var(--ph-amber); }
.chip-APPROVED, .chip-READY_FOR_CONVERSION { background: var(--ph-green-soft); color: var(--ph-green); }
.chip-CONVERTED_TO_JOB { background: var(--ph-blue-soft); color: var(--ph-blue); }
.chip-type { background: var(--ph-blue-soft); color: var(--ph-blue); }
.chip-type.maint { background: #ffe9d9; color: #c45a10; }
.chip-type.general { background: #eceff3; color: #44546f; }
.chip-type.prod { background: var(--ph-green-soft); color: var(--ph-green); }
.due-overdue { color: var(--ph-red); font-weight: 600; }
.due-today { color: var(--ph-red); font-weight: 600; }
.due-none { color: var(--ph-muted); }
.due-done { color: var(--ph-muted); }
.dtms-person { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #e9eef6; font-weight: 700; font-size: 11px; color: #3b4d6b; }

/* ---- priority queue ------------------------------------------------------ */
.dtms-table { width: 100%; border-collapse: collapse; }
.dtms-table th { text-align: left; font-size: 11px; letter-spacing: 0.6px; color: var(--ph-muted); font-weight: 600; padding: 6px 8px; text-transform: uppercase; border-bottom: 1px solid var(--ph-line); }
.dtms-table td { padding: 8px; border-bottom: 1px solid #f0f3f8; vertical-align: middle; }
.dtms-row.job { cursor: default; }
.dtms-row.dragging { opacity: 0.4; }
.dtms-row.dragover td { border-top: 2px solid var(--ph-accent); }
.dtms-row.sub td { background: #fafbfd; font-size: 13px; }
.dtms-row.sub td:first-child { border-left: 3px solid #e1e7f0; }
.dtms-handle { cursor: grab; color: #9aa7bd; user-select: none; font-size: 16px; }
.dtms-num { font-weight: 700; color: var(--ph-muted); width: 28px; }
.dtms-title { font-weight: 600; }
.dtms-title small { display: block; color: var(--ph-muted); font-weight: 400; font-size: 11.5px; }
.dtms-link { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.dtms-link:hover { color: var(--ph-accent-dark); text-decoration: underline; }
.dtms-expand { background: none; border: 0; cursor: pointer; color: var(--ph-muted); font-size: 14px; width: 22px; }
.dtms-bar { height: 7px; border-radius: 4px; background: #e8edf4; overflow: hidden; min-width: 70px; }
.dtms-bar > i { display: block; height: 100%; background: linear-gradient(90deg, #26b25a, #1b8a3c); }
.dtms-prog { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ph-muted); }
.dtms-empty { text-align: center; padding: 28px 12px; color: var(--ph-muted); }
.dtms-empty .big { font-size: 34px; opacity: 0.5; }
.dtms-empty b { display: block; color: var(--ph-text); margin: 6px 0 2px; font-size: 15px; }

/* ---- 1DJ ----------------------------------------------------------------- */
.dtms-1dj-item { display: flex; gap: 10px; align-items: center; border-left: 4px solid var(--ph-blue); background: #fafbfd; border-radius: 8px; padding: 10px 12px; margin: 8px 0; }
.dtms-1dj-item.overdue { border-left-color: var(--ph-red); }
.dtms-1dj-item.active { border-left-color: var(--ph-green); }
.dtms-1dj-item .grow { flex: 1; min-width: 0; }

/* ---- calendar ------------------------------------------------------------ */
.dtms-cal { display: grid; gap: 10px; }
.dtms-cal.d4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dtms-cal.d7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.dtms-cal-day { border: 1px solid var(--ph-line); border-radius: 10px; min-height: 150px; display: flex; flex-direction: column; background: #fff; }
.dtms-cal-day.today { border-color: var(--ph-accent); box-shadow: 0 0 0 1px var(--ph-accent) inset; }
.dtms-cal-head { padding: 8px 10px; font-weight: 700; border-bottom: 1px solid var(--ph-line); display: flex; justify-content: space-between; }
.dtms-cal-head em { font-style: normal; color: var(--ph-accent); font-size: 11px; letter-spacing: 1px; }
.dtms-cal-items { padding: 8px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.dtms-cal-item { border-radius: 8px; padding: 6px 8px; font-size: 12.5px; background: var(--ph-blue-soft); border-left: 3px solid var(--ph-blue); display: flex; gap: 6px; align-items: center; }
.dtms-cal-item.DEADLINE { background: #fde8e6; border-left-color: var(--ph-red); }
.dtms-cal-item.DOWNTIME { background: #fff1d6; border-left-color: #d89b00; }
.dtms-cal-item.MAINTENANCE { background: #ffe9d9; border-left-color: #e0671a; }
.dtms-cal-item.MILESTONE { background: var(--ph-green-soft); border-left-color: var(--ph-green); }
.dtms-cal-item .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dtms-cal-empty { margin: auto; text-align: center; color: var(--ph-muted); font-size: 12.5px; }
.dtms-cal-add { border: 0; background: none; color: var(--ph-muted); padding: 8px 10px; text-align: left; cursor: pointer; border-top: 1px dashed var(--ph-line); }
.dtms-cal-add:hover { color: var(--ph-accent-dark); }

/* ---- forms / modal ------------------------------------------------------- */
.dtms-overlay { position: fixed; inset: 0; background: rgba(7, 20, 42, 0.55); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 12px; z-index: 1000; overflow-y: auto; }
.dtms-modal { background: #fff; border-radius: 14px; width: 100%; max-width: 640px; padding: 20px 22px; box-shadow: 0 20px 60px rgba(7, 20, 42, 0.4); }
.dtms-modal.wide { max-width: 860px; }
.dtms-modal h3 { margin: 0 0 12px; font-size: 19px; }
.dtms-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.dtms-form .full { grid-column: 1 / -1; }
.dtms-form label { display: block; font-size: 12px; color: var(--ph-muted); margin-bottom: 3px; }
.dtms-form input[type="text"], .dtms-form input[type="date"], .dtms-form input[type="number"], .dtms-form input[type="time"], .dtms-form select { width: 100%; }
.dtms-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.dtms-hint { color: var(--ph-muted); font-size: 12px; }
.dtms-error { color: var(--ph-red); margin-top: 8px; }
.dtms-toast { position: fixed; bottom: 22px; right: 22px; background: var(--ph-navy-800); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 1100; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); }
.dtms-req { border: 1px solid var(--ph-line); border-radius: 10px; padding: 12px 14px; margin: 10px 0; background: #fff; }
.dtms-req-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.dtms-req-head .grow { flex: 1; min-width: 200px; }
.dtms-req dl { display: grid; grid-template-columns: 130px 1fr; gap: 3px 10px; margin: 8px 0; font-size: 13px; }
.dtms-req dt { color: var(--ph-muted); }
.dtms-req dd { margin: 0; white-space: pre-wrap; }

/* ---- tablets and phones ------------------------------------------------------- */
@media (max-width: 1100px) {
  .dtms-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dtms-grid { grid-template-columns: 1fr; }
  .dtms-cal.d7 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  /* tables keep their column widths and scroll sideways inside their card */
  .dtms-panel { overflow-x: auto; }
  .dtms-table { min-width: 680px; }
}
/* tablet: slimmer navigation */
@media (min-width: 701px) and (max-width: 1024px) {
  .dtms-nav { width: 196px; padding: 14px 8px; }
  .dtms-nav-item { font-size: 13.5px; padding: 10px; }
  .dtms-body { padding: 0 14px; }
  .dtms-hero { padding: 18px 20px; }
  .dtms-modal { max-width: 94vw; }
}
@media (max-width: 700px) {
  /* the navigation becomes a scrolling bar across the top; the page below scrolls on its own */
  .dtms { flex-direction: column; height: 100vh; min-height: 0; }
  .dtms-nav { width: 100%; flex: none; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 4px; overflow-x: auto; padding: 6px 8px; -webkit-overflow-scrolling: touch; }
  .dtms-brand, .dtms-tagline, .dtms-nav-foot .dtms-user { display: none; }
  .dtms-nav-item { width: auto; flex: none; white-space: nowrap; margin: 0; padding: 10px 12px; font-size: 14px; }
  .dtms-nav-foot { margin: 0 0 0 4px; padding: 0; border: 0; flex: none; }
  .dtms-back { margin: 0; width: auto; white-space: nowrap; padding: 9px 12px; }
  .dtms-main { flex: 1; min-height: 0; }
  .dtms-hero { min-height: 96px; padding: 14px 16px; }
  .dtms-hero h1 { font-size: 20px; }
  .dtms-body { padding: 0 12px; }
  .dtms-cards { gap: 10px; margin: -18px 0 14px; }
  .dtms-stat b { font-size: 24px; }
  .dtms-clock { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .dtms-panel { padding: 12px 12px; }
  .dtms-panel-head select, .dtms-panel-head input[type="text"] { flex: 1 1 130px; min-width: 0; }
  .dtms-cal.d4, .dtms-cal.d7 { grid-template-columns: 1fr; }
  .dtms-cal-day { min-height: 0; }
  .dtms-form { grid-template-columns: 1fr; }
  .dtms-btn { min-height: 42px; }
  .dtms .dtms-form input, .dtms .dtms-form select, .dtms input[type="text"], .dtms input[type="date"], .dtms input[type="number"], .dtms input[type="time"], .dtms select, .dtms textarea { font-size: 16px; }
  .dtms-overlay { padding: 2vh 8px; }
  .dtms-modal { padding: 16px; }
  .dtms-req dl { grid-template-columns: 1fr; }
}

/* ---- touch reordering + compact phone queue ---------------------------------- */
.dtms-mv { display: none; gap: 2px; }
.dtms-mv .dtms-btn { padding: 2px 8px; min-height: 0; }
@media (pointer: coarse), (max-width: 700px) {
  .dtms-handle { display: none; }
  .dtms-mv { display: inline-flex; }
  .dtms-mv .dtms-btn { min-height: 38px; min-width: 38px; }
}
@media (max-width: 1100px) {
  .dtms-title { min-width: 170px; }
}
@media (max-width: 700px) {
  .dtms-table { min-width: 0; }
  /* keep: arrows, number, title, assigned, due, status (hide type + progress) */
  .dtms-queue th:nth-child(8), .dtms-queue td:nth-child(8),
  .dtms-queue th:nth-child(9), .dtms-queue td:nth-child(9) { display: none; }
  .dtms-table td, .dtms-table th { padding: 8px 5px; }
  .dtms-title { min-width: 110px; }
}

/* ---- phone: priority queue rows become compact cards ------------------------- */
@media (max-width: 700px) {
  .dtms-queue, .dtms-queue tbody { display: block; width: 100%; min-width: 0; }
  .dtms-queue thead { display: none; }
  .dtms-queue tr {
    display: grid;
    grid-template-columns: auto auto 1fr auto auto;
    grid-template-areas: "mv exp title title title" "mv num who due status";
    align-items: center;
    gap: 2px 8px;
    padding: 10px 2px;
    border-bottom: 1px solid var(--ph-line);
  }
  .dtms-queue td { display: block; padding: 0; border: 0; min-width: 0; }
  .dtms-queue td:nth-child(1) { grid-area: mv; }
  .dtms-queue td:nth-child(2) { grid-area: num; }
  .dtms-queue td:nth-child(3) { grid-area: exp; }
  .dtms-queue td:nth-child(4) { grid-area: title; }
  .dtms-queue td:nth-child(5) { grid-area: who; }
  .dtms-queue td:nth-child(6) { grid-area: due; font-size: 12.5px; }
  .dtms-queue td:nth-child(7) { grid-area: status; }
  .dtms-queue td:empty { display: none; }
  .dtms-queue tr.sub { background: #fafbfd; margin-left: 10px; }
  .dtms-queue .dtms-title small { display: inline; margin-left: 6px; }
}
.dtms-link { white-space: normal; overflow-wrap: anywhere; }

/* tables inside pop-ups (sub-task list) wrap instead of scrolling sideways */
@media (max-width: 700px) {
  .dtms-modal .dtms-table { min-width: 0; display: block; }
  .dtms-modal .dtms-table tbody { display: block; }
  .dtms-modal .dtms-table tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 8px 0; border-bottom: 1px solid var(--ph-line); }
  .dtms-modal .dtms-table td { display: block; padding: 0; border: 0; }
  .dtms-modal .dtms-table td:nth-child(2) { flex: 1 1 60%; min-width: 0; }
}

/* ---- priority vs due-date warning, sub-task dependency tick list ---------------------------------------- */
.dtms-clash { margin-left: 6px; color: var(--ph-amber); font-weight: 700; cursor: help; }
.dtms-ticks { max-height: 150px; overflow-y: auto; border: 1px solid var(--ph-line); border-radius: 8px; padding: 6px 10px; background: #fff; }
.dtms-tick { display: flex; gap: 8px; align-items: center; padding: 4px 0; cursor: pointer; font-size: 13px; color: var(--ph-text); margin: 0; }
.dtms-tick.off { opacity: 0.55; cursor: not-allowed; }
.dtms-tick input { width: auto; }

/* ---- calendar: month view ---------------------------------------------------------------------------------- */
.dtms-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.dtms-mdow { text-align: center; font-size: 12px; font-weight: 700; color: var(--ph-muted); padding: 4px 0; }
.dtms-mday { min-height: 104px; background: #fff; border: 1px solid var(--ph-line); border-radius: 8px; padding: 4px 5px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dtms-mday.other { background: #f4f6fa; }
.dtms-mday.other .dtms-mhead span { color: #a3adbf; }
.dtms-mday.today { outline: 2px solid var(--ph-accent); }
.dtms-mhead { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; }
.dtms-madd { border: 0; background: none; color: var(--ph-muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 4px; border-radius: 4px; }
.dtms-madd:hover { background: var(--ph-accent-soft); color: var(--ph-accent-dark); }
.dtms-mitem { font-size: 11.5px; line-height: 1.25; padding: 2px 5px; border-radius: 4px; background: var(--ph-blue-soft); color: #153c7a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dtms-mitem[data-open] { cursor: pointer; }
.dtms-mitem b { font-weight: 700; opacity: 0.8; }
.dtms-mmore { border: 0; background: none; color: var(--ph-blue); font-size: 11.5px; cursor: pointer; text-align: left; padding: 0 2px; }
@media (max-width: 700px) {
  .dtms-month { gap: 2px; }
  .dtms-mday { min-height: 70px; padding: 2px; }
  .dtms-mitem { font-size: 10.5px; padding: 1px 3px; }
}

/* summary cards you can click */
.dtms-stat.clickable { cursor: pointer; transition: transform 0.08s, box-shadow 0.12s; }
.dtms-stat.clickable:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(11, 30, 59, 0.14); }
.dtms-stat.clickable:focus-visible { outline: 2px solid var(--ph-accent); outline-offset: 2px; }
