/* Copyright (C) 2026 TechVallis d.o.o.
 * SPDX-License-Identifier: GPL-3.0-only
 */
/* TechVallis Roundcube Groupware v1.9.39. All selectors are scoped to .tvgw or the dedicated taskbar link. */
.tvgw {
  --tvgw-ink: #263039; --tvgw-muted: #68727d; --tvgw-border: #dbe0e5;
  --tvgw-paper: #ffffff; --tvgw-wash: #f7f8fa; --tvgw-red: #822c41;
  --tvgw-red-hover: #682234; --tvgw-soft-red: #f8edf0; --tvgw-focus: #174d85;
  color: var(--tvgw-ink); max-width: 1440px; margin: 0 auto;
  padding: 20px 24px 52px; font: 14px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
.tvgw, .tvgw * { box-sizing: border-box; }
.tvgw [hidden] { display: none !important; }
.tvgw h1, .tvgw h2, .tvgw h3, .tvgw p { line-height: 1.4; }
.tvgw h1 { margin: 1px 0 16px; font-size: 25px; letter-spacing: -.5px; font-weight: 760; }
.tvgw h2 { margin: 0; font-size: 20px; letter-spacing: -.35px; font-weight: 720; }
.tvgw h3 { margin: 0 0 8px; font-size: 15px; font-weight: 700; }
.tvgw p { margin: 4px 0 12px; }
.tvgw a { color: #6b2940; text-decoration: none; }
.tvgw a:hover { text-decoration: underline; }
.tvgw a:focus-visible, .tvgw button:focus-visible, .tvgw input:focus-visible,
.tvgw select:focus-visible, .tvgw textarea:focus-visible { outline: 2px solid var(--tvgw-focus); outline-offset: 2px; }
.tvgw .tvgw-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; border-bottom: 1px solid var(--tvgw-border); padding: 0 0 14px; margin: 0 0 20px; }
.tvgw .tvgw-tabs a { text-decoration: none; padding: 9px 17px; border-radius: 8px; background: #f2f4f6; color: #4e5a65; font-weight: 650; }
.tvgw .tvgw-tabs a.selected { background: var(--tvgw-red); color: white; box-shadow: 0 2px 7px #842d4140; }
.tvgw .tvgw-main-content { display: block; }
.tvgw .tvgw-view-intro { display: flex; justify-content: space-between; align-items: start; gap: 15px; margin: 0 0 15px; }
.tvgw .tvgw-view-intro p { color: var(--tvgw-muted); margin-top: 4px; }
.tvgw .tvgw-selection { margin: 12px 0 14px; display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.tvgw .tvgw-selection label { min-width: 230px; }
.tvgw label { display: flex; flex-direction: column; gap: 5px; font-weight: 650; font-size: 12.5px; }
.tvgw input, .tvgw select, .tvgw textarea { border: 1px solid #bfc8d1; border-radius: 7px; background: #fff; color: #29313a; padding: 8px 10px; min-height: 36px; width: 100%; font: inherit; font-size: 14px; line-height: 1.4; }
.tvgw textarea { min-height: 76px; resize: vertical; }
.tvgw button { border: 1px solid var(--tvgw-red); border-radius: 7px; background: var(--tvgw-red); color: #fff; cursor: pointer; font-size: 13px; font-weight: 700; line-height: 1.4; padding: 8px 14px; min-height: 36px; }
.tvgw button:hover { background: var(--tvgw-red-hover); color: #fff; }
.tvgw button.tvgw-secondary { border-color: var(--tvgw-border); color: #3d4b55; background: #fff; }
.tvgw button.tvgw-secondary:hover { background: #f5f7f9; }
.tvgw button.tvgw-danger { background: #fff; border-color: #edd8dc; color: #9d334a; }
.tvgw button.tvgw-danger:hover { background: #fbecf0; }
.tvgw .tvgw-notice, .tvgw .tvgw-warning, .tvgw .tvgw-error { border: 1px solid #cddbe3; border-left: 4px solid #3e7894; background: #f0f8fb; padding: 12px 14px; border-radius: 6px; margin: 12px 0 18px; }
.tvgw .tvgw-error { background: #fff1f2; border-color: #e2bbc4; border-left-color: var(--tvgw-red); }
.tvgw .tvgw-warning { background: #fff7e5; border-color: #ebd9b2; border-left-color: #af801b; }
/* Date navigation */
.tvgw .tvgw-cal-header { margin: 16px 0 12px; display: flex; align-items: center; gap: 16px; justify-content: space-between; flex-wrap: wrap; }
.tvgw .tvgw-date-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tvgw .tvgw-date-nav h2 { margin-left: 14px; }
.tvgw .tvgw-nav-arrow, .tvgw .tvgw-today { border: 1px solid var(--tvgw-border); border-radius: 7px; background: var(--tvgw-paper); color: var(--tvgw-ink); display: inline-flex; align-items: center; justify-content: center; min-width: 38px; min-height: 36px; text-decoration: none; font-weight: 600; }
.tvgw .tvgw-nav-arrow { font-size: 22px; line-height: 1; }
.tvgw .tvgw-today { padding: 0 12px; font-size: 13px; }
.tvgw .tvgw-nav-arrow:hover, .tvgw .tvgw-today:hover { background: #f7f7fa; text-decoration: none; }
.tvgw .tvgw-modes { background: #f1f3f5; padding: 4px; border-radius: 9px; display: inline-flex; gap: 2px; }
.tvgw .tvgw-modes a { border-radius: 6px; padding: 7px 15px; color: #59626a; font-size: 13px; font-weight: 650; text-decoration: none; }
.tvgw .tvgw-modes a.is-active { background: #fff; color: var(--tvgw-red); box-shadow: 0 1px 5px #00000014; }
/* Month grid */
.tvgw .tvgw-board-scroll { width: 100%; overflow-x: auto; border: 1px solid var(--tvgw-border); border-radius: 11px; background: #fff; box-shadow: 0 2px 9px #2029370c; }
.tvgw .tvgw-month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); min-width: 850px; }
.tvgw .tvgw-weekday { text-align: center; padding: 12px 4px; background: #f5f6f8; color: #6b747c; text-transform: uppercase; letter-spacing: .7px; font-weight: 750; font-size: 11px; border-right: 1px solid var(--tvgw-border); }
.tvgw .tvgw-month-cell { min-width: 0; min-height: 127px; border-top: 1px solid var(--tvgw-border); border-right: 1px solid var(--tvgw-border); padding: 7px 6px 9px; background: white; overflow: hidden; }
.tvgw .tvgw-month-cell:nth-of-type(7n+7) { border-right: 0; }
.tvgw .tvgw-month-cell.tvgw-adjacent { background: #fafbfc; }
.tvgw .tvgw-month-cell.tvgw-adjacent .tvgw-day-number { color: #9b9fa4; }
.tvgw .tvgw-month-cell.tvgw-current { box-shadow: inset 0 0 0 2px #a4435a; }
.tvgw .tvgw-day-number { display: inline-flex; margin-bottom: 6px; width: 28px; height: 26px; border-radius: 50%; align-items: center; justify-content: center; color: #303b46; font-weight: 700; }
.tvgw .tvgw-current .tvgw-day-number { background: var(--tvgw-red); color: #fff; }
.tvgw .tvgw-event { margin: 4px 0; padding: 5px 8px; border-radius: 5px; border-left: 3px solid var(--tvgw-event-accent, #7e6684); background: var(--tvgw-event-bg, #f0eef3); color: #32404a; overflow-wrap: anywhere; line-height: 1.35; }
.tvgw .tvgw-event-title { font-weight: 650; font-size: 12px; display: block; }
.tvgw .tvgw-event-time { font-size: 11px; font-weight: 760; display: block; opacity: .75; margin-bottom: 1px; }
.tvgw .tvgw-event-allday { border-left-width: 4px; }
.tvgw .tvgw-color-0 { --tvgw-event-accent: #9d4557; --tvgw-event-bg: #f8eaf0; }
.tvgw .tvgw-color-1 { --tvgw-event-accent: #317c8e; --tvgw-event-bg: #e8f5f7; }
.tvgw .tvgw-color-2 { --tvgw-event-accent: #6b779f; --tvgw-event-bg: #ecedf7; }
.tvgw .tvgw-color-3 { --tvgw-event-accent: #6c8654; --tvgw-event-bg: #edf5e8; }
.tvgw .tvgw-color-4 { --tvgw-event-accent: #a87b31; --tvgw-event-bg: #fcf3df; }
.tvgw .tvgw-color-5 { --tvgw-event-accent: #7a689c; --tvgw-event-bg: #f3edf9; }
.tvgw .tvgw-more { display: block; margin: 6px 4px; color: var(--tvgw-red); font-size: 12px; font-weight: 650; }
/* Week columns */
.tvgw .tvgw-week-grid { display: grid; grid-template-columns: repeat(7,minmax(130px,1fr)); min-width: 940px; }
.tvgw .tvgw-week-column { border-right: 1px solid var(--tvgw-border); min-height: 310px; padding: 0 9px 12px; }
.tvgw .tvgw-week-column:last-child { border-right: 0; }
.tvgw .tvgw-week-column.tvgw-current { background: #fdf8f9; }
.tvgw .tvgw-week-title { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 15px 3px; margin: 0 -9px 12px; border-bottom: 1px solid var(--tvgw-border); color: #495762; text-decoration: none; }
.tvgw .tvgw-week-title span { text-transform: uppercase; letter-spacing: .6px; font-size: 10px; font-weight: 750; }
.tvgw .tvgw-week-title strong { font-size: 25px; line-height: 1.15; }
.tvgw .tvgw-week-empty { font-size: 12px; color: #9da5ac; text-align: center; margin-top: 20px; }
.tvgw .tvgw-event-meta { margin-top: 5px; color: #55616b; font-size: 11px; }
.tvgw .tvgw-event-note { margin: 6px 0 0; font-size: 12px; white-space: normal; }
/* Day timeline */
.tvgw .tvgw-day-layout { display: grid; grid-template-columns: 255px minmax(0,1fr); gap: 17px; margin-top: 12px; }
.tvgw .tvgw-all-day, .tvgw .tvgw-timeline { border: 1px solid var(--tvgw-border); border-radius: 10px; background: white; overflow: hidden; }
.tvgw .tvgw-all-day { padding: 16px; align-self: start; }
.tvgw .tvgw-all-day h3 { margin-bottom: 15px; }
.tvgw .tvgw-empty-text { color: #86919a; font-size: 13px; }
.tvgw .tvgw-hour { display: grid; grid-template-columns: 60px minmax(0, 1fr); min-height: 54px; border-top: 1px solid #edf0f3; }
.tvgw .tvgw-hour:first-child { border-top: 0; }
.tvgw .tvgw-hour-label { background: #fafbfc; text-align: right; padding: 12px 10px 0 4px; color: #7c858e; font-size: 12px; }
.tvgw .tvgw-hour-content { padding: 3px 12px; border-left: 1px solid #e9edf0; }
.tvgw .tvgw-hour-content .tvgw-event { max-width: 650px; }
/* Create forms */
.tvgw .tvgw-bottom-panels { margin-top: 25px; display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 17px; align-items: start; }
.tvgw .tvgw-card { background: white; border: 1px solid var(--tvgw-border); border-radius: 10px; padding: 18px; box-shadow: 0 1px 6px #222a330b; }
.tvgw .tvgw-card-heading { margin: 0 0 16px; }
.tvgw .tvgw-card-heading p { color: var(--tvgw-muted); margin-bottom: 0; font-size: 12.5px; }
.tvgw .tvgw-form { display: flex; flex-direction: column; gap: 12px; }
.tvgw .tvgw-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px,1fr)); gap: 12px; }
.tvgw .tvgw-check { display: flex; flex-direction: row; align-items: center; gap: 9px; margin: 1px 0; cursor: pointer; font-size: 13px; }
.tvgw .tvgw-check input { margin: 0; width: 16px; min-height: 16px; height: 16px; accent-color: var(--tvgw-red); }
.tvgw .tvgw-form > button { align-self: start; margin-top: 2px; }
.tvgw .tvgw-disclaimer { color: var(--tvgw-muted); font-size: 12px; margin: 14px 0; }
/* Tasks */
.tvgw .tvgw-task-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 22px 0 18px; }
.tvgw .tvgw-task-stats div { background: #fff; border: 1px solid var(--tvgw-border); border-radius: 9px; padding: 14px 17px; display: flex; flex-direction: column; }
.tvgw .tvgw-task-stats strong { font-size: 25px; color: #25313b; line-height: 1.1; }
.tvgw .tvgw-task-stats span { margin-top: 5px; color: var(--tvgw-muted); font-size: 12px; font-weight: 650; }
.tvgw .tvgw-task-filters { display: flex; flex-wrap: wrap; gap: 10px; border-bottom: 1px solid var(--tvgw-border); margin: 8px 0 20px; }
.tvgw .tvgw-task-filters a { padding: 8px 6px; text-decoration: none; color: #616b75; font-weight: 650; border-bottom: 3px solid transparent; }
.tvgw .tvgw-task-filters a.is-active { color: var(--tvgw-red); border-bottom-color: var(--tvgw-red); }
.tvgw .tvgw-task-section { margin: 20px 0 26px; }
.tvgw .tvgw-task-section h3 { display: flex; align-items: center; gap: 9px; font-size: 16px; margin-bottom: 11px; }
.tvgw .tvgw-count { background: #ebedf1; color: #495762; border-radius: 99px; min-width: 24px; padding: 2px 8px; text-align: center; font-size: 11px; }
.tvgw .tvgw-task-list { border: 1px solid var(--tvgw-border); border-radius: 9px; background: white; overflow: hidden; }
.tvgw .tvgw-task-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 16px; border-top: 1px solid #edf0f2; }
.tvgw .tvgw-task-row:first-child { border-top: none; }
.tvgw .tvgw-task-row.is-complete .tvgw-task-content > strong { text-decoration: line-through; color: #808b92; }
.tvgw .tvgw-task-content { min-width: 0; flex: 1 1 auto; }
.tvgw .tvgw-task-content strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.tvgw .tvgw-task-sub { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 5px; color: #7c8791; font-size: 11px; }
.tvgw .tvgw-priority { border-radius: 5px; padding: 2px 6px; background: #eff1f2; color: #6c767d; font-weight: 700; }
.tvgw .tvgw-priority-high { background: #f9e6e9; color: #a43e53; }
.tvgw .tvgw-priority-low { background: #e8f2e7; color: #62805c; }
.tvgw .tvgw-task-row .tvgw-actions { flex: 0 0 auto; }
.tvgw .tvgw-note { color: #5e6973; font-size: 12px; margin: 7px 0 0; white-space: normal; }
.tvgw .tvgw-empty-wide { padding: 24px; background: white; border: 1px dashed var(--tvgw-border); border-radius: 8px; }
.tvgw .tvgw-readonly { color: var(--tvgw-muted); font-size: 12px; }
.tvgw .tvgw-inline { display: inline-block; margin: 2px 4px 2px 0; }
.tvgw .tvgw-inline button { padding: 6px 9px; min-height: 30px; }
/* Files */
.tvgw .tvgw-breadcrumb { color: var(--tvgw-muted); margin: 15px 0; }
.tvgw .tvgw-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--tvgw-border); }
.tvgw .tvgw-table th { background: #f5f6f8; font-size: 12px; color: #5e6c78; text-align: left; }
.tvgw .tvgw-table th, .tvgw .tvgw-table td { padding: 12px; border-bottom: 1px solid var(--tvgw-border); overflow-wrap: anywhere; text-align: left; }
.tvgw .tvgw-table td { vertical-align: top; }
.tvgw-nonelastic-shell { overflow: auto; margin: 8px 16px 32px; }
a.tvgroupware-nav { text-decoration: none; }
a.tvgroupware-nav::before { content: '\25A6'; padding-right: 4px; }
/* v1.9.19: Elastic's generic .menu.toolbar a.selected uses the success
 * green (#41b849). The previous pointer override missed the .selected state,
 * including the state reached while clicking. Keep Groupware's foreground
 * constant across pointer/focus/selected changes on the desktop task menu.
 * Leave native task-menu hover and selected BACKGROUNDS intact, and never
 * style other Roundcube taskbar entries. This is not a data/navigation change.
 * The phone menu is light, and dark-mode phone menus are dark; retain contrast.
 */
#taskmenu.menu.toolbar a.tvgroupware-nav { transition: none; }
@media (min-width: 481px) {
  #taskmenu.menu.toolbar a.tvgroupware-nav,
  #taskmenu.menu.toolbar a.tvgroupware-nav:hover,
  #taskmenu.menu.toolbar a.tvgroupware-nav:active,
  #taskmenu.menu.toolbar a.tvgroupware-nav:focus,
  #taskmenu.menu.toolbar a.tvgroupware-nav.selected {
    color: #fff;
  }
}
@media (max-width: 480px) {
  #taskmenu.menu.toolbar a.tvgroupware-nav.selected { color: inherit; }
}
#taskmenu.menu.toolbar a.tvgroupware-nav:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -3px;
}
/* Larry taskbar states (v1.9.25). In Larry the button is inside
 * #taskbar.topright (NOT Elastic's #taskmenu.menu.toolbar). Preserve
 * native hover blue and the selected-tab background (#2c2c2c), while
 * suppressing Larry's transient cyan :focus background on mouse clicks.
 * Only the Groupware link is affected; the other taskbar buttons remain
 * styled by Roundcube. Keyboard :focus-visible retains its outline.
 */
#taskbar.topright a.tvgroupware-nav {
  transition: none;
  /* Native Larry taskbar buttons share the top edge of the header.  The
   * plugin's simpler .inner span has a different inline-block baseline. */
  vertical-align: top;
}
/* Mirror the line box of Larry's native .button-inner without its 34px
 * sprite-image indentation.  This keeps both label and selected background
 * aligned with Mail, Contacts and Settings. */
#taskbar.topright a.tvgroupware-nav > span.inner {
  display: inline-block;
  font-size: 110%;
  font-weight: normal;
  padding: 5px 0 0;
  height: 19px;
}
/* A mouse click or ordinary programmatic focus must not cause the cyan
 * Larry #taskbar a:focus background. This applies before selection. */
#taskbar.topright a.tvgroupware-nav:focus,
#taskbar.topright a.tvgroupware-nav:active {
  color: #eee;
  background-color: transparent;
  outline: none;
}
/* Hover changes only the text and glyph, not the taskbar background. */
#taskbar.topright a.tvgroupware-nav:hover {
  color: #20a6fb;
  background-color: transparent;
}
/* Keep the selected background and blue text consistent with Larry's
 * native #taskbar a.button-selected treatment. Explicit :focus and :active
 * ensure that a click cannot replace it with a transient cyan highlight.
 * Keep this rule after :hover and the unselected :focus/:active rule. */
#taskbar.topright a.tvgroupware-nav.selected,
#taskbar.topright a.tvgroupware-nav.selected:hover,
#taskbar.topright a.tvgroupware-nav.selected:focus,
#taskbar.topright a.tvgroupware-nav.selected:active {
  color: #20a6fb;
  background-color: #2c2c2c;
}
#taskbar.topright a.tvgroupware-nav:focus-visible {
  outline: 2px solid #37beff;
  outline-offset: -3px;
}
@media(max-width: 1100px) {
  .tvgw .tvgw-bottom-panels { grid-template-columns: 1fr; }
  .tvgw .tvgw-day-layout { grid-template-columns: 1fr; }
}
@media(max-width: 660px) {
  .tvgw { padding: 12px 9px 30px; }
  .tvgw .tvgw-month-grid { min-width: 820px; }
  .tvgw .tvgw-form-row { grid-template-columns: 1fr; }
  .tvgw .tvgw-task-stats { gap: 5px; }
  .tvgw .tvgw-task-stats div { padding: 12px 9px; }
  .tvgw .tvgw-task-row { flex-direction: column; align-items: stretch; }
  .tvgw .tvgw-cal-header { align-items: start; }
}
@media(prefers-reduced-motion: no-preference) {
  .tvgw a, .tvgw button { transition: background-color .12s ease; }
}

.tvgw .tvgw-event-controls { margin-top: 8px; border-top: 1px solid #00000012; padding-top: 6px; }
/* v1.2: scrollable content in Elastic, Larry and Classic. Avoid fixed-height clipping. */
#layout-content.tvgw-elastic, #layout-content.tvgw-elastic .scroller {
  min-height: 0 !important; min-width: 0 !important; overflow: auto !important;
  overscroll-behavior: contain;
}
.tvgw-nonelastic-shell { position: relative; min-height: 320px; max-height: calc(100vh - 135px);
  overflow: auto !important; overscroll-behavior: contain; }
.tvgw { max-width: none; min-width: 0; }
.tvgw-main-content { min-width: 0; }
.tvgw-weekday.tvgw-weekend, .tvgw-month-cell.tvgw-weekend,
.tvgw-week-column.tvgw-weekend { background-color: #f8f3ec; }
.tvgw-month-cell.tvgw-weekend.tvgw-adjacent { background-color: #f7f2ed; }
.tvgw .tvgw-edit-button, .tvgw .tvgw-cancel { display:inline-flex; align-items:center;
  margin: 2px 5px 2px 0; padding: 6px 10px; min-height: 29px; border:1px solid var(--tvgw-border);
  border-radius:6px; background:#fff; text-decoration:none; font-weight:650; font-size:12px; }
.tvgw .tvgw-edit-button:hover { background:#f2f5f7; text-decoration:none; }
.tvgw .tvgw-hide-past { display:block; margin: 5px 0 13px; }
.tvgw .tvgw-hide-past label { font-weight:550; }
.tvgw .tvgw-day-choices { display:flex; gap:14px; flex-wrap:wrap; padding:10px 0; }
.tvgw .tvgw-preferences, .tvgw .tvgw-help { margin: 13px 0; max-width: 920px; }
.tvgw details > summary { cursor:pointer; font-weight:650; padding:5px 0; }
.tvgw .tvgw-help code { overflow-wrap:anywhere; }
.tvgw .tvgw-quota { border:1px solid var(--tvgw-border); border-radius:9px;
  margin:15px 0; background:white; padding:14px; max-width:800px; }
.tvgw .tvgw-quota-head { display:flex; flex-wrap:wrap; justify-content:space-between;
  gap:8px; margin-bottom:9px; }
.tvgw .tvgw-quota-track { height:14px; background:#e2e7eb; border-radius:99px;
  overflow:hidden; }
.tvgw .tvgw-quota-track > div { background:#8c354b; height:100%; border-radius:99px; }
.tvgw .tvgw-quota small { display:block; color:var(--tvgw-muted); margin-top:8px; }
.tvgw .tvgw-file-scroll { overflow-x:auto; max-width:100%; }
.tvgw .tvgw-file-scroll table { min-width:880px; }
.tvgw .tvgw-file-icon { display:inline-block; min-width:25px; font-size:17px; vertical-align:middle; }
.tvgw .tvgw-preview img { display:block; max-width:300px; max-height:220px;
  object-fit:contain; margin:9px 0; border:1px solid #dedede; border-radius:5px; }
.tvgw .tvgw-preview { display:inline-block; vertical-align:middle; margin-right:6px; }
.tvgw .tvgw-preview summary { font-size:12px; color:var(--tvgw-red); }
.tvgw .tvgw-contact-form { margin-top:18px; width:100%; max-width:none; min-width:0; }
.tvgw .tvgw-contact-form label { margin:10px 0; }
@media (max-width:700px) { .tvgw-nonelastic-shell { max-height:calc(100vh - 75px); }
  .tvgw .tvgw-file-scroll { width:100%; } }

/* Groupware 1.3: sorting remains visible on narrow legacy skins */
.tvgw .tvgw-sort-form { display:inline-flex; margin:8px 12px 8px 0; align-items:center; gap:8px; }
.tvgw .tvgw-sort-form select { margin-left:7px; }

/* Groupware 1.4: compact calendar/task filtering aligned with the selector. */
.tvgw .tvgw-selection-row { display:flex; align-items:center; flex-wrap:wrap; gap:10px 24px; margin:10px 0 13px; }
.tvgw .tvgw-selection-row > form { margin:0; min-width:0; }
.tvgw .tvgw-selection-row .tvgw-hide-past,
.tvgw .tvgw-selection-row .tvgw-show-tasks { display:inline-flex; align-items:center; flex-wrap:wrap; }
.tvgw .tvgw-selection-row .tvgw-check { margin:0; font-weight:550; }
.tvgw .tvgw-event-task { border-left-color:#287f71; background:#e8f4f0; }
.tvgw .tvgw-event-task .tvgw-event-title { color:#176c61; }
.tvgw .tvgw-event-task.tvgw-task-done { background:#f1f3f3; border-left-color:#a8b2b6; opacity:.78; }
.tvgw .tvgw-event-task.tvgw-task-done .tvgw-event-title { text-decoration:line-through; color:#687477; }
@media (max-width: 660px) {
  .tvgw .tvgw-selection-row { align-items:flex-start; gap:9px; }
  .tvgw .tvgw-selection-row > form { max-width:100%; }
}

/* v1.5: fully clickable (editable) calendar cards. Forms remain outside links. */
.tvgw .tvgw-event-open, .tvgw .tvgw-event-static { display: block; color: inherit; text-decoration: none; }
.tvgw .tvgw-event-open:hover { color: inherit; text-decoration: none; }
.tvgw .tvgw-event-clickable:hover { filter: brightness(.97); box-shadow: 0 0 0 1px var(--tvgw-red); }
.tvgw .tvgw-event-open:focus-visible { display: block; outline: 2px solid var(--tvgw-focus); outline-offset: 2px; }
.tvgw .tvgw-event-clickable { cursor: pointer; }
/* Contact import/custom properties; works without any external JS dependencies. */
.tvgw .tvgw-custom-fields { border:1px solid var(--tvgw-border); border-radius:8px; padding:14px; margin:8px 0; min-width:0; }
.tvgw .tvgw-custom-fields > legend { font-weight:750; padding:0 7px; }
.tvgw .tvgw-custom-fields > p { color:var(--tvgw-muted); font-size:12px; }
.tvgw .tvgw-custom-row { display:grid; grid-template-columns:minmax(115px,1fr) minmax(145px,1.4fr) minmax(90px,auto); align-items:end; gap:9px; margin:9px 0; }
.tvgw .tvgw-custom-row > button { min-height:36px; }
.tvgw .tvgw-custom-fields > button { margin-top:7px; }
.tvgw .tvgw-import { margin-top:17px; width:100%; max-width:none; min-width:0; }
.tvgw .tvgw-contacts-table td:last-child { min-width:230px; }
@media(max-width:650px) { .tvgw .tvgw-custom-row { grid-template-columns:1fr; } }

/* Official Roundcube Elastic dark mode sets the 'dark-mode' class on html.
   These rules modify only Groupware, not the Roundcube mail interface. */
html.dark-mode .tvgw {
  color-scheme:dark;
  --tvgw-ink:#dbe5e8; --tvgw-muted:#a1b1bb; --tvgw-border:#45545b;
  --tvgw-paper:#242f34; --tvgw-wash:#1f292e; --tvgw-red:#b75570;
  --tvgw-red-hover:#ca6982; --tvgw-soft-red:#432c35; --tvgw-focus:#8abaff;
  color:var(--tvgw-ink); background:#21292c;
}
html.dark-mode .tvgw h1, html.dark-mode .tvgw h2, html.dark-mode .tvgw h3,
html.dark-mode .tvgw .tvgw-event-meta, html.dark-mode .tvgw .tvgw-event-note,
html.dark-mode .tvgw .tvgw-task-content strong { color:var(--tvgw-ink); }
html.dark-mode .tvgw a { color:#ec9bae; }
html.dark-mode .tvgw a:hover { color:#ffc0cf; }
html.dark-mode .tvgw .tvgw-tabs a { color:#d0dde3; background:#34434a; }
html.dark-mode .tvgw .tvgw-tabs a.selected { background:#9d4059; color:#fff; }
html.dark-mode .tvgw .tvgw-card, html.dark-mode .tvgw .tvgw-month-board,
html.dark-mode .tvgw .tvgw-month-cell, html.dark-mode .tvgw .tvgw-all-day,
html.dark-mode .tvgw .tvgw-timeline, html.dark-mode .tvgw .tvgw-task-list,
html.dark-mode .tvgw .tvgw-task-stats div, html.dark-mode .tvgw .tvgw-quota,
html.dark-mode .tvgw .tvgw-table, html.dark-mode .tvgw .tvgw-empty-wide {
  background:#29363c; color:var(--tvgw-ink); border-color:var(--tvgw-border);
}
html.dark-mode .tvgw .tvgw-month-cell.tvgw-adjacent { background:#263138; }
html.dark-mode .tvgw .tvgw-month-cell.tvgw-weekend,
html.dark-mode .tvgw .tvgw-week-column.tvgw-weekend { background:#31383b; }
html.dark-mode .tvgw .tvgw-month-cell.tvgw-weekend.tvgw-adjacent { background:#2b3438; }
html.dark-mode .tvgw .tvgw-weekday, html.dark-mode .tvgw .tvgw-table th,
html.dark-mode .tvgw .tvgw-hour-label { background:#34434b; color:#c4d2d9; }
html.dark-mode .tvgw .tvgw-week-title { color:#d0dde4; }
html.dark-mode .tvgw .tvgw-week-column.tvgw-current,
html.dark-mode .tvgw .tvgw-current:not(.tvgw-month-cell) { background:#354048; }
html.dark-mode .tvgw .tvgw-hour, html.dark-mode .tvgw .tvgw-hour-content,
html.dark-mode .tvgw .tvgw-task-row { border-color:#435159; }
html.dark-mode .tvgw .tvgw-day-number { color:#dce6ec; }
html.dark-mode .tvgw .tvgw-current .tvgw-day-number { color:#fff; }
html.dark-mode .tvgw input, html.dark-mode .tvgw select,
html.dark-mode .tvgw textarea { color:#e9f0f3; background:#1b252a; border-color:#53616a; }
html.dark-mode .tvgw input::placeholder, html.dark-mode .tvgw textarea::placeholder { color:#a0adb7; }
html.dark-mode .tvgw button, html.dark-mode .tvgw .tvgw-today { background:#9b415b; color:#fff; border-color:#a9576d; }
html.dark-mode .tvgw button:hover { background:#ad506a; }
html.dark-mode .tvgw button.tvgw-secondary, html.dark-mode .tvgw .tvgw-edit-button,
html.dark-mode .tvgw .tvgw-cancel { background:#34434a; color:#dce7eb; border-color:#59666e; }
html.dark-mode .tvgw button.tvgw-secondary:hover, html.dark-mode .tvgw .tvgw-edit-button:hover { background:#40525a; }
html.dark-mode .tvgw button.tvgw-danger { background:#4e2c39; color:#ffc3d0; border-color:#844759; }
html.dark-mode .tvgw .tvgw-notice { background:#253e4b; border-color:#4a7688; color:#d6e9f2; }
html.dark-mode .tvgw .tvgw-warning { background:#493c28; border-color:#846f42; color:#f4dfb9; }
html.dark-mode .tvgw .tvgw-error { background:#4a2b36; border-color:#884f61; color:#ffdae3; }
html.dark-mode .tvgw .tvgw-quota-track { background:#45545c; }
html.dark-mode .tvgw .tvgw-quota-track > div { background:#b75773; }
html.dark-mode .tvgw .tvgw-event { color:#eff3f5; background:#3c4551; }
html.dark-mode .tvgw .tvgw-color-0 { --tvgw-event-accent:#e1849d; --tvgw-event-bg:#553742; }
html.dark-mode .tvgw .tvgw-color-1 { --tvgw-event-accent:#81b7c5; --tvgw-event-bg:#2b4b54; }
html.dark-mode .tvgw .tvgw-color-2 { --tvgw-event-accent:#a2aeda; --tvgw-event-bg:#3c435f; }
html.dark-mode .tvgw .tvgw-color-3 { --tvgw-event-accent:#a6c087; --tvgw-event-bg:#394c3b; }
html.dark-mode .tvgw .tvgw-color-4 { --tvgw-event-accent:#e6bd77; --tvgw-event-bg:#554837; }
html.dark-mode .tvgw .tvgw-color-5 { --tvgw-event-accent:#bdb0e3; --tvgw-event-bg:#474056; }
html.dark-mode .tvgw .tvgw-event { background:var(--tvgw-event-bg,#3a454b); border-left-color:var(--tvgw-event-accent,#aab7c2); }
html.dark-mode .tvgw .tvgw-event-task { --tvgw-event-bg:#28483f; --tvgw-event-accent:#81c3af; }
html.dark-mode .tvgw .tvgw-event-task .tvgw-event-title { color:#b7f0dc; }
html.dark-mode .tvgw .tvgw-event-task.tvgw-task-done { --tvgw-event-bg:#343d40; --tvgw-event-accent:#65777b; }
html.dark-mode .tvgw .tvgw-event-task.tvgw-task-done .tvgw-event-title { color:#c0cdd0; }
html.dark-mode .tvgw .tvgw-event-clickable:hover { filter:brightness(1.13); }
html.dark-mode .tvgw .tvgw-event-open, html.dark-mode .tvgw .tvgw-event-open:hover { color:inherit; }
html.dark-mode .tvgw .tvgw-task-filters a { color:#b6c2cb; }
html.dark-mode .tvgw .tvgw-task-filters a.is-active { color:#f3a5b7; }
html.dark-mode .tvgw .tvgw-task-sub, html.dark-mode .tvgw .tvgw-note,
html.dark-mode .tvgw .tvgw-empty-text, html.dark-mode .tvgw .tvgw-readonly,
html.dark-mode .tvgw .tvgw-disclaimer { color:#b6c4cd; }
html.dark-mode .tvgw .tvgw-count, html.dark-mode .tvgw .tvgw-priority { background:#45545d; color:#dfe9ed; }
html.dark-mode .tvgw .tvgw-priority-high { background:#58333c; color:#ffc4d1; }
html.dark-mode .tvgw .tvgw-priority-low { background:#344b3a; color:#d1e7c3; }
html.dark-mode .tvgw .tvgw-custom-fields { border-color:#53616a; }
html.dark-mode .tvgw .tvgw-custom-fields > p { color:#acbac3; }
/* Roundcube's Month/Week/Day control and calendar arrows in Elastic dark mode. */
html.dark-mode .tvgw .tvgw-modes { background:#34434a; }
html.dark-mode .tvgw .tvgw-modes a { color:#cbd7dd; }
html.dark-mode .tvgw .tvgw-modes a.is-active { background:#53626b; color:#fff; box-shadow:none; }
html.dark-mode .tvgw .tvgw-nav-arrow { background:#334149; color:#dce8ed; border-color:#506069; }
html.dark-mode .tvgw .tvgw-nav-arrow:hover { background:#42535c; color:#fff; }
html.dark-mode .tvgw .tvgw-week-empty { color:#b2c2cb; }


/* v1.6.1: shared two-row toolbar controls. The selector, filter checkbox,
   address-book selector, and export link have the same caption/control tracks.
   No position nudges: each control is geometrically centered in a 40px row. */
.tvgw .tvgw-cal-filters,
.tvgw .tvgw-contacts-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 22px;
}
.tvgw .tvgw-cal-filters > form.tvgw-filter-form,
.tvgw .tvgw-contacts-toolbar > form.tvgw-contacts-picker,
.tvgw .tvgw-contacts-toolbar > .tvgw-contact-export-control {
  display: grid;
  grid-template-rows: 18px 40px;
  row-gap: 5px;
  align-content: end;
  align-self: flex-end;
  min-height: 0;
  height: auto;
  margin: 0;
  padding: 0;
  max-width: 100%;
}
.tvgw .tvgw-cal-filters > form.tvgw-filter-picker,
.tvgw .tvgw-contacts-toolbar > form.tvgw-contacts-picker {
  width: 245px;
}
.tvgw .tvgw-cal-filters .tvgw-filter-caption,
.tvgw .tvgw-contacts-toolbar .tvgw-filter-caption {
  display: block;
  height: 18px;
  line-height: 18px;
  margin: 0;
  padding: 0;
  font-size: 12.5px;
  font-weight: 650;
}
.tvgw .tvgw-cal-filters .tvgw-filter-spacer,
.tvgw .tvgw-contacts-toolbar .tvgw-filter-spacer {
  visibility: hidden;
}
.tvgw .tvgw-cal-filters > form.tvgw-filter-picker select,
.tvgw .tvgw-contacts-toolbar > form.tvgw-contacts-picker select {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 40px;
  min-height: 40px;
  line-height: normal;
  margin: 0;
}
.tvgw .tvgw-cal-filters > form.tvgw-filter-check {
  min-height: 0;
}
.tvgw .tvgw-cal-filters > form.tvgw-filter-check > label.tvgw-filter-control {
  display: flex;
  box-sizing: border-box;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  height: 40px;
  min-height: 40px;
  line-height: 1.35;
  margin: 0;
  padding: 0;
  font-size: 13px;
  font-weight: 550;
}
.tvgw .tvgw-cal-filters > form.tvgw-filter-check > label.tvgw-filter-control input[type="checkbox"] {
  appearance: auto;
  -webkit-appearance: checkbox;
  display: block;
  flex: 0 0 16px;
  box-sizing: border-box;
  width: 16px;
  height: 16px;
  min-height: 16px;
  min-width: 16px;
  padding: 0;
  margin: 0;
  position: static;
  float: none;
  align-self: center;
}
.tvgw .tvgw-cal-filters > form.tvgw-filter-check > label.tvgw-filter-control span {
  margin: 0;
  padding: 0;
  line-height: 1.35;
}
.tvgw .tvgw-contacts-toolbar > .tvgw-contact-export-control > a.tvgw-contact-export {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  height: 40px;
  min-height: 40px;
  box-sizing: border-box;
  margin: 0;
  padding: 6px 12px;
  white-space: normal;
}

/* Date selection: browser-specific date formatting is no longer exposed as a
   second visible field. Only the text input displays Roundcube's date format.
   A calendar-icon button opens the native picker by direct user activation. */
.tvgw .tvgw-date-field { min-width: 0; }
.tvgw .tvgw-date-field > label { display: block; margin-bottom: 6px; }
.tvgw .tvgw-date-pair {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.tvgw .tvgw-date-pair > input[type="text"] {
  flex: 1 1 185px;
  min-width: 145px;
  width: auto;
}
.tvgw .tvgw-date-launcher {
  display: inline-flex;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  align-items: center;
  position: relative;
}
.tvgw .tvgw-date-launcher.is-fallback { flex: 0 1 auto; width: auto; gap: 7px; }
.tvgw .tvgw-date-open {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  color: var(--tvgw-ink);
  background: var(--tvgw-paper);
  border-color: var(--tvgw-border);
}
.tvgw .tvgw-date-open:hover {
  background: var(--tvgw-wash);
  color: var(--tvgw-ink);
}
.tvgw .tvgw-date-native-hidden {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  min-width: 1px;
  height: 1px;
  min-height: 1px;
  opacity: 0;
  pointer-events: none;
  clip-path: inset(50%);
  padding: 0;
  margin: 0;
}
.tvgw .tvgw-date-native-hidden.tvgw-date-native-fallback {
  position: static;
  width: 155px;
  min-width: 125px;
  height: 40px;
  opacity: 1;
  clip-path: none;
  pointer-events: auto;
}
.tvgw .tvgw-date-open:disabled { opacity: .45; cursor: not-allowed; }
.tvgw .tvgw-date-launcher:has(input:disabled) .tvgw-date-open { opacity: .45; }
.tvgw [data-tv-timed-fields][hidden],
.tvgw [data-tv-date-fields][hidden] { display: none !important; }
html.dark-mode .tvgw button.tvgw-date-open {
  background: var(--tvgw-paper);
  color: var(--tvgw-ink);
  border-color: var(--tvgw-border);
}
html.dark-mode .tvgw button.tvgw-date-open:hover { background: #34434a; }

/* Put each selected calendar's display preferences under Additional calendar,
   without moving the underlying forms or changing how preferences are stored. */
.tvgw .tvgw-calendar-sidebar {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-self: start;
}
.tvgw .tvgw-calendar-sidebar > .tvgw-preferences {
  margin: 0;
  max-width: none;
}
@media (max-width: 660px) {
  .tvgw .tvgw-cal-filters,
  .tvgw .tvgw-contacts-toolbar { align-items: flex-end; gap: 10px 14px; }
  .tvgw .tvgw-date-pair { flex-wrap: wrap; }
}


/* v1.6.2 — Contact actions share one row and a single control height.
   The original links and POST form retain all of their existing behavior.
   Explicit flex alignment avoids skin-specific inline-form baselines. */
.tvgw .tvgw-contacts-table td .tvgw-contact-actions {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
}
.tvgw .tvgw-contacts-table td .tvgw-contact-actions > form.tvgw-inline {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  line-height: normal;
  vertical-align: middle;
}
.tvgw .tvgw-contacts-table td .tvgw-contact-actions > a.tvgw-edit-button,
.tvgw .tvgw-contacts-table td .tvgw-contact-actions > form.tvgw-inline > button.tvgw-danger {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 34px;
  min-height: 34px;
  margin: 0;
  padding: 6px 10px;
  line-height: 1.2;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  vertical-align: middle;
}
.tvgw .tvgw-contacts-table td .tvgw-contact-actions > span.tvgw-readonly {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin: 0;
}

/* Full-width informational panels, matching the adjacent calendar board
   and file table, without changing any other card/sidebar width. */
.tvgw details.tvgw-help,
.tvgw section.tvgw-quota {
  display: block;
  width: 100%;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
}

/* v1.6.3 — Task action alignment across Elastic, Larry and Classic.
   The action area contains an Edit link and two independent POST forms.
   Reset the inline-form margins, the form's column layout, and the differing
   link/button baseline metrics without changing any action or request data. */
.tvgw .tvgw-task-row > .tvgw-actions {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  justify-content: flex-start;
  align-content: center;
  gap: 6px;
  flex: 0 0 auto;
  min-width: 0;
  max-width: 100%;
}
.tvgw .tvgw-task-row > .tvgw-actions > form.tvgw-inline {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  height: 34px;
  margin: 0;
  padding: 0;
  gap: 0;
  line-height: normal;
  vertical-align: middle;
}
.tvgw .tvgw-task-row > .tvgw-actions > a.tvgw-edit-button,
.tvgw .tvgw-task-row > .tvgw-actions > form.tvgw-inline > button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: auto;
  height: 34px;
  min-height: 34px;
  margin: 0;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  text-align: center;
  vertical-align: middle;
}
.tvgw .tvgw-task-row > .tvgw-actions > span.tvgw-readonly {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin: 0;
}

/* v1.8.4: Contacts creation and import panels align with the full-width
   address-book table rather than stopping at 720px. Input rows use two
   columns at desktop widths and one column on narrow screens. */
.tvgw .tvgw-contact-primary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 18px;
  min-width: 0;
}
.tvgw .tvgw-contact-primary > label { min-width: 0; }
.tvgw .tvgw-import .tvgw-form > label { max-width: 680px; }
@media (max-width: 700px) {
  .tvgw .tvgw-contact-primary { grid-template-columns: minmax(0, 1fr); }
}

/* v1.8.7: accessible server-sorted, bulk-selectable Contacts table. */
.tvgw .tvgw-contact-bulk-form {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px 13px;
  padding: 11px 0;
  margin: 8px 0 5px;
}
.tvgw .tvgw-contact-bulk-form strong { font-size: 13px; min-width: 85px; }
.tvgw .tvgw-contact-bulk-form button:disabled { opacity: .5; cursor: not-allowed; }
.tvgw .tvgw-contacts-table .tvgw-check-column { width: 44px; min-width: 44px; max-width: 44px; text-align: center; padding: 10px 5px; }
.tvgw .tvgw-contacts-table input[type="checkbox"] { width: 17px; height: 17px; min-height: 17px; vertical-align: middle; margin: 0; cursor: pointer; }
.tvgw .tvgw-contacts-table .tvgw-check-only { display: inline-flex; margin: 0; cursor: pointer; }
.tvgw .tvgw-contacts-table .tvgw-sort-link { color: inherit; font-weight: 700; text-decoration: none; white-space: nowrap; }
.tvgw .tvgw-contacts-table .tvgw-sort-link:hover,
.tvgw .tvgw-contacts-table .tvgw-sort-link:focus-visible { color: var(--tvgw-red); text-decoration: underline; }
.tvgw .tvgw-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.tvgw .tvgw-contact-values { border: 1px solid var(--tvgw-border); border-radius: 8px; padding: 12px; margin: 12px 0; min-width: 0; }
.tvgw .tvgw-contact-values legend { font-weight: 700; padding: 0 5px; }
.tvgw .tvgw-contact-value-row { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(110px, .7fr) minmax(90px, auto); gap: 8px; align-items: end; margin-bottom: 8px; }
.tvgw .tvgw-contact-value-row > label { min-width: 0; }
.tvgw .tvgw-contact-value-row button { margin: 0; }
.tvgw .tvgw-vcard-source { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; min-height: 350px; tab-size: 2; white-space: pre; }
@media (max-width: 680px) {
  .tvgw .tvgw-contact-value-row { grid-template-columns: minmax(0, 1fr); }
  .tvgw .tvgw-contact-value-row button { justify-self: start; }
}

/* v1.8.8: keep Save/Create and Cancel side-by-side inside editor forms,
   even on narrow screens. The primary button may wrap its *label* (not the
   entire action) when space is constrained. Both controls remain equal height. */
.tvgw .tvgw-form-actions {
  display: flex;
  flex-flow: row nowrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  margin-top: 4px;
}
.tvgw .tvgw-form-actions > button,
.tvgw .tvgw-form-actions > a.tvgw-cancel {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 38px;
  margin: 0;
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  border-radius: 7px;
  text-align: center;
  text-decoration: none;
}
.tvgw .tvgw-form-actions > button {
  flex: 0 1 auto;
  min-width: 0;
  white-space: normal;
  overflow-wrap: break-word;
}
.tvgw .tvgw-form-actions > a.tvgw-cancel {
  flex: 0 0 auto;
  white-space: nowrap;
}
.tvgw .tvgw-form-actions > a.tvgw-cancel:hover {
  background: var(--tvgw-wash);
  text-decoration: none;
}
html.dark-mode .tvgw .tvgw-form-actions > a.tvgw-cancel:hover {
  background: #40525a;
}

/* v1.9.0 — Stable file action positions and accessible bulk toolbar. */
.tvgw .tvgw-file-bulkbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px;
  padding: 12px 14px; margin: 13px 0 7px;
  border: 1px solid var(--tvgw-border); border-radius: 8px;
  background: var(--tvgw-paper);
}
.tvgw .tvgw-file-bulkbar > button { min-height: 36px; }
.tvgw .tvgw-file-bulkbar button:disabled { opacity: .5; cursor: not-allowed; }
.tvgw .tvgw-file-help { margin: 0 0 12px; color: var(--tvgw-muted); font-size: 12px; }
.tvgw .tvgw-files-table td:first-child,
.tvgw .tvgw-files-table th:first-child { width: 40px; text-align: center; }
.tvgw .tvgw-files-table th:first-child input,
.tvgw .tvgw-files-table td:first-child input { width: 17px; height: 17px; }
.tvgw .tvgw-files-table th:last-child,
.tvgw .tvgw-files-table td:last-child { min-width: 210px; }
.tvgw .tvgw-file-actions { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.tvgw .tvgw-file-action-row { display: flex; align-items: flex-start; flex-flow: row nowrap; gap: 7px; }
.tvgw .tvgw-file-action-row > form.tvgw-inline { display: inline-flex; margin: 0; padding: 0; }
.tvgw .tvgw-file-action-row > form.tvgw-inline button,
.tvgw .tvgw-file-rename > summary {
  display: inline-flex; align-items: center; justify-content: center;
  box-sizing: border-box; min-height: 34px; margin: 0; padding: 6px 10px;
  font-size: 12px; font-weight: 650; border-radius: 6px;
}
.tvgw .tvgw-file-rename { position: relative; min-width: 74px; }
.tvgw .tvgw-file-rename > summary {
  cursor: pointer; list-style: none; background: var(--tvgw-paper);
  border: 1px solid var(--tvgw-border); color: var(--tvgw-ink);
}
.tvgw .tvgw-file-rename > summary::-webkit-details-marker { display: none; }
.tvgw .tvgw-file-rename > form {
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: stretch;
  gap: 8px; width: 220px; padding: 10px; margin-top: 6px;
  border: 1px solid var(--tvgw-border); border-radius: 7px;
  background: var(--tvgw-paper); box-shadow: 0 2px 8px #00000016;
}
.tvgw .tvgw-file-rename > form > label { margin: 0; }
.tvgw .tvgw-file-rename > form > label > input { width: 100%; box-sizing: border-box; }
.tvgw .tvgw-file-rename-buttons { display:flex; align-items:stretch; gap:6px; }
.tvgw .tvgw-file-rename-buttons > button { flex:1 1 0; min-width:0; margin:0; padding:6px 4px; }
.tvgw .tvgw-file-actions > .tvgw-preview { display: block; margin: 0; }
html.dark-mode .tvgw .tvgw-file-bulkbar,
html.dark-mode .tvgw .tvgw-file-rename > form { background: var(--tvgw-paper); }
@media (max-width: 660px) {
  .tvgw .tvgw-file-bulkbar { align-items: stretch; }
  .tvgw .tvgw-file-bulkbar > button { flex: 1 1 auto; }
}

/* v1.9.1: Align all file cells with the primary Rename/Delete action row.
 * Preview and expanded Rename are secondary content and must not reposition
 * the checkbox, name or metadata anchors relative to the row's first line.
 * Scoped to Files only; does not change Contacts/Calendar tables. */
.tvgw .tvgw-files-table tbody td { vertical-align: top; }
.tvgw .tvgw-files-table .tvgw-file-row-anchor {
  display: flex; align-items: center; box-sizing: border-box; min-height: 34px;
  min-width: 0;
}
.tvgw .tvgw-files-table .tvgw-file-select-anchor { justify-content: center; }
.tvgw .tvgw-files-table .tvgw-file-select-anchor input {
  display: block; margin: 0; flex: 0 0 auto; cursor: pointer;
}
.tvgw .tvgw-files-table .tvgw-file-name { gap: 5px; }
.tvgw .tvgw-files-table .tvgw-file-name > .tvgw-file-icon {
  flex: 0 0 25px; min-width: 0; line-height: 1.2;
}
.tvgw .tvgw-files-table .tvgw-file-name > a {
  min-width: 0; overflow-wrap: anywhere;
}
.tvgw .tvgw-files-table .tvgw-file-action-row { min-height: 34px; }
/* Fix column geometry so expanding an image Preview never resizes the Actions
 * column or moves the Delete button horizontally. Horizontal scrolling is
 * contained inside the Files table on small screens. */
.tvgw .tvgw-file-scroll > .tvgw-files-table {
  table-layout: fixed; width: 100%; min-width: 1020px;
}
.tvgw .tvgw-files-table thead th:first-child { width: 44px; }
.tvgw .tvgw-files-table thead th:nth-child(2) { width: 28%; }
.tvgw .tvgw-files-table thead th:last-child { width: 224px; }

/* v1.9.2: bounded Contacts search, paging and non-destructive duplicate hints */
.tvgw .tvgw-contacts-toolbar { align-items: end; gap: 12px 20px; }
.tvgw .tvgw-contact-search { display:flex; gap:8px; align-items:center; flex-wrap:wrap; min-width:0; }
.tvgw .tvgw-contact-search input[type=search] { min-width:160px; width:clamp(170px,24vw,350px); max-width:100%; }
.tvgw .tvgw-contact-search label { margin:0; white-space:nowrap; }
.tvgw .tvgw-duplicate-filter { display:inline-flex; align-items:center; gap:6px; }
.tvgw .tvgw-contact-pager { display:flex; align-items:center; gap:9px; flex-wrap:wrap;
  justify-content:flex-start; padding:9px 0; color:var(--tvgw-muted); font-size:13px; }
.tvgw .tvgw-contact-pager .tvgw-edit-button { margin:0; }
.tvgw .tvgw-contact-search-info { font-size:12px; color:var(--tvgw-muted); margin:10px 0 3px; }
.tvgw .tvgw-duplicate-tag { display:inline-block; margin-left:5px; padding:2px 6px;
  border:1px solid var(--tvgw-border); border-radius:8px; font-size:10px;
  color:var(--tvgw-red); font-weight:650; white-space:nowrap; }
.tvgw .tvgw-contacts-table .tvgw-duplicate-candidate td { border-bottom-color:var(--tvgw-border); }
@media(max-width:660px) {
  .tvgw .tvgw-contact-search { align-items:stretch; width:100%; }
  .tvgw .tvgw-contact-search input[type=search] { flex:1 1 180px; width:auto; }
  .tvgw .tvgw-contact-pager { gap:7px; }
}

/* v1.9.3: Contacts toolbar has a compact address-book selector and a search
   control with a properly sized native checkbox. Full-book export belongs
   beside selected-contact export, not among navigation/filter controls. */
.tvgw .tvgw-contacts-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 245px) minmax(0, 1fr);
  gap: 12px 20px;
  align-items: end;
  width: 100%;
}
.tvgw .tvgw-contacts-toolbar > form.tvgw-contacts-picker {
  min-width: 0;
  width: 100%;
  align-self: end;
}
.tvgw .tvgw-contacts-toolbar > form.tvgw-contact-search {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto auto auto;
  grid-template-rows: 18px 40px;
  gap: 5px 12px;
  align-items: center;
  align-content: end;
  min-width: 0;
  margin: 0;
}
.tvgw .tvgw-contacts-toolbar .tvgw-contact-search > label[for="tvgw-contact-search-term"] {
  grid-column: 1;
  grid-row: 1;
  display: block;
  font-size: 12.5px;
  line-height: 18px;
  height: 18px;
  margin: 0;
}
.tvgw .tvgw-contacts-toolbar .tvgw-contact-search input[type="search"] {
  grid-column: 1;
  grid-row: 2;
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 40px;
  min-height: 40px;
  margin: 0;
}
.tvgw .tvgw-contacts-toolbar .tvgw-contact-search > label.tvgw-duplicate-filter {
  grid-column: 2;
  grid-row: 2;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 0;
  padding: 0;
  font-size: 12.5px;
  white-space: nowrap;
  cursor: pointer;
}
.tvgw .tvgw-contact-search .tvgw-duplicate-filter > input[type="checkbox"] {
  -webkit-appearance: checkbox;
  appearance: auto;
  display: inline-block;
  flex: 0 0 16px;
  width: 16px;
  min-width: 16px;
  max-width: 16px;
  height: 16px;
  min-height: 16px;
  max-height: 16px;
  padding: 0;
  margin: 0;
  position: static;
  float: none;
  cursor: pointer;
}
.tvgw .tvgw-contacts-toolbar .tvgw-contact-search > button[type="submit"] {
  grid-column: 3;
  grid-row: 2;
  min-height: 40px;
  white-space: nowrap;
}
.tvgw .tvgw-contacts-toolbar .tvgw-contact-search > a {
  grid-column: 4;
  grid-row: 2;
  justify-self: start;
  white-space: nowrap;
}
.tvgw .tvgw-contact-bulk-form > a.tvgw-contact-bulk-export-all {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 12px;
  white-space: normal;
}
@media (max-width: 1050px) {
  .tvgw .tvgw-contacts-toolbar { grid-template-columns: minmax(0, 1fr); }
  .tvgw .tvgw-contacts-toolbar > form.tvgw-contacts-picker { max-width: 320px; }
}
@media (max-width: 660px) {
  .tvgw .tvgw-contacts-toolbar > form.tvgw-contact-search {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 18px 40px 30px 40px;
    gap: 6px 10px;
    width: 100%;
    align-items: center;
  }
  .tvgw .tvgw-contacts-toolbar .tvgw-contact-search > label[for="tvgw-contact-search-term"] {
    grid-row: 1;
    grid-column: 1 / -1;
  }
  .tvgw .tvgw-contacts-toolbar .tvgw-contact-search input[type="search"] {
    grid-row: 2;
    grid-column: 1 / -1;
  }
  .tvgw .tvgw-contacts-toolbar .tvgw-contact-search > label.tvgw-duplicate-filter {
    grid-row: 3;
    grid-column: 1 / -1;
  }
  .tvgw .tvgw-contacts-toolbar .tvgw-contact-search > button[type="submit"] {
    grid-row: 4;
    grid-column: 1;
    white-space: normal;
  }
  .tvgw .tvgw-contacts-toolbar .tvgw-contact-search > a {
    grid-row: 4;
    grid-column: 2;
  }
}

/* v1.9.4: footer and bounded Contacts page-size selector */
.tvgw .tvgw-footer {
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between;
  gap:6px 16px; margin-top:28px; padding:13px 1px 0;
  border-top:1px solid var(--tvgw-border); color:var(--tvgw-muted);
  font-size:12px; line-height:1.5;
}
.tvgw .tvgw-contacts-toolbar > form.tvgw-contact-search {
  grid-template-columns: minmax(160px, 1fr) auto auto auto auto;
}
.tvgw .tvgw-contacts-toolbar .tvgw-contact-search > label.tvgw-per-page-label {
  grid-column:3; grid-row:1 / 3; display:flex; flex-direction:column;
  align-self:stretch; justify-content:end; gap:5px; white-space:nowrap;
  font-size:12.5px; min-width:116px;
}
.tvgw .tvgw-contact-search .tvgw-per-page-label > select {
  width:auto; min-width:116px; max-width:165px; min-height:40px;
  height:40px; font-size:13px;
}
.tvgw .tvgw-contacts-toolbar .tvgw-contact-search > button[type="submit"] { grid-column:4; }
.tvgw .tvgw-contacts-toolbar .tvgw-contact-search > a { grid-column:5; }
@media (max-width: 660px) {
  .tvgw .tvgw-contacts-toolbar > form.tvgw-contact-search {
    grid-template-columns:minmax(0, 1fr) auto;
    grid-template-rows:18px 40px 30px auto 40px;
  }
  .tvgw .tvgw-contacts-toolbar .tvgw-contact-search > label.tvgw-per-page-label {
    grid-column:1 / -1; grid-row:4; justify-content:start;
    flex-direction:row; align-items:center;
  }
  .tvgw .tvgw-contact-search .tvgw-per-page-label > select { min-width:135px; }
  .tvgw .tvgw-contacts-toolbar .tvgw-contact-search > button[type="submit"] {
    grid-column:1; grid-row:5;
  }
  .tvgw .tvgw-contacts-toolbar .tvgw-contact-search > a { grid-column:2; grid-row:5; }
}

/* v1.9.5: two-tier Contacts controls. Search/navigation above the list;
   duplicate discovery and page size live with the results, not in the search
   form. The existing Roundcube list-size preference remains authoritative. */
.tvgw .tvgw-contacts-toolbar {
  display: grid;
  grid-template-columns: minmax(185px, 265px) minmax(0, 1fr);
  align-items: end;
  gap: 12px 18px;
  width: 100%;
  margin: 14px 0 12px;
  padding: 14px 16px;
  border: 1px solid var(--tvgw-border);
  border-radius: 10px;
  background: var(--tvgw-wash);
}
.tvgw .tvgw-contacts-toolbar > form.tvgw-contacts-picker {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-self: end;
  margin: 0;
}
.tvgw .tvgw-contacts-toolbar .tvgw-contacts-picker .tvgw-filter-caption {
  min-width: 0;
  margin: 0;
  font-size: 12px;
  line-height: 18px;
}
.tvgw .tvgw-contacts-toolbar > form.tvgw-contacts-picker select {
  width: 100%; max-width: none;
  min-width: 0; height: 40px;
}
.tvgw .tvgw-contacts-toolbar > form.tvgw-contact-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-rows: 18px 40px;
  align-items: center;
  align-self: end;
  gap: 5px 10px;
  width: 100%;
  min-width: 0;
  margin: 0;
}
.tvgw .tvgw-contacts-toolbar .tvgw-contact-search > label[for="tvgw-contact-search-term"] {
  grid-column: 1; grid-row: 1;
  font-size: 12px; line-height: 18px;
  height: 18px; margin: 0;
}
.tvgw .tvgw-contacts-toolbar .tvgw-contact-search input[type="search"] {
  grid-column: 1; grid-row: 2;
  width: 100%; min-width: 0; max-width: none;
  height: 40px; min-height: 40px; margin: 0;
}
.tvgw .tvgw-contacts-toolbar .tvgw-contact-search > button[type="submit"] {
  grid-column: 2; grid-row: 2;
  min-height: 40px; white-space: nowrap;
}
.tvgw .tvgw-contacts-toolbar .tvgw-contact-search > a {
  grid-column: 3; grid-row: 2;
  justify-self: start; white-space: nowrap;
}
.tvgw .tvgw-contact-results-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: 10px 0;
  padding: 0 2px;
}
.tvgw .tvgw-contact-results-tools > .tvgw-contact-search-info {
  margin: 0;
  flex: 1 1 220px;
  min-width: 0;
}
.tvgw .tvgw-contact-results-tools .tvgw-duplicate-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid var(--tvgw-border);
  border-radius: 18px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  background: var(--tvgw-paper);
  color: var(--tvgw-ink);
}
.tvgw .tvgw-contact-results-tools .tvgw-duplicate-toggle:hover,
.tvgw .tvgw-contact-results-tools .tvgw-duplicate-toggle.is-active {
  border-color: var(--tvgw-red);
  background: var(--tvgw-soft-red);
  color: var(--tvgw-red);
}
.tvgw .tvgw-contact-results-tools > form.tvgw-contact-pagesize-form {
  margin: 0;
  min-width: 0;
}
.tvgw .tvgw-contact-pagesize-form > label {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  white-space: nowrap;
  margin: 0;
}
.tvgw .tvgw-contact-pagesize-form select {
  display: inline-block;
  width: auto; min-width: 112px; max-width: 174px;
  min-height: 34px; height: 34px;
  padding: 5px 8px; margin: 0;
  font-size: 12px;
}
.tvgw .tvgw-contact-compare {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
  margin: 14px 0;
}
.tvgw .tvgw-contact-compare-card {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--tvgw-border);
  border-radius: 8px;
  background: var(--tvgw-paper);
  overflow-wrap: anywhere;
}
.tvgw .tvgw-contact-compare-card h4 { margin: 0 0 10px; font-size: 13px; color: var(--tvgw-muted); }
.tvgw .tvgw-contact-compare-card dl {
  display: grid; grid-template-columns: 88px minmax(0,1fr);
  gap: 4px 8px;
  margin: 12px 0;
}
.tvgw .tvgw-contact-compare-card dt { font-weight: 700; color: var(--tvgw-muted); }
.tvgw .tvgw-contact-compare-card dd { margin: 0; min-width: 0; }
.tvgw .tvgw-review-peer-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }
.tvgw .tvgw-duplicate-review { margin: 20px 0; scroll-margin-top: 24px; }
.tvgw .tvgw-duplicate-review ul { margin: 8px 0 16px; }
.tvgw .tvgw-duplicate-review .tvgw-help { color: var(--tvgw-muted); font-size: 12px; }
.tvgw .tvgw-duplicate-review .tvgw-form { margin-top: 12px; }
.tvgw .tvgw-duplicate-tag { text-decoration: none; }
.tvgw .tvgw-duplicate-tag:hover { background: var(--tvgw-soft-red); text-decoration: underline; }
@media (max-width: 900px) {
  .tvgw .tvgw-contacts-toolbar { grid-template-columns: minmax(0,1fr); }
  .tvgw .tvgw-contacts-toolbar > form.tvgw-contacts-picker { max-width: 360px; }
}
@media (max-width: 560px) {
  .tvgw .tvgw-contacts-toolbar { padding: 12px; }
  .tvgw .tvgw-contacts-toolbar > form.tvgw-contact-search {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 18px 40px 40px;
    gap: 6px 10px;
  }
  .tvgw .tvgw-contacts-toolbar .tvgw-contact-search > label[for="tvgw-contact-search-term"] {
    grid-column: 1 / -1; grid-row: 1;
  }
  .tvgw .tvgw-contacts-toolbar .tvgw-contact-search input[type="search"] {
    grid-column: 1 / -1; grid-row: 2;
  }
  .tvgw .tvgw-contacts-toolbar .tvgw-contact-search > button[type="submit"] {
    grid-column: 1; grid-row: 3;
  }
  .tvgw .tvgw-contacts-toolbar .tvgw-contact-search > a {
    grid-column: 2; grid-row: 3;
  }
  .tvgw .tvgw-contact-results-tools { gap: 8px 10px; }
  .tvgw .tvgw-contact-results-tools > .tvgw-contact-search-info { flex-basis: 100%; }
  .tvgw .tvgw-contact-compare { grid-template-columns: minmax(0,1fr); }
}
/* Explicitly override the generic selection form's align-items:end. */
.tvgw .tvgw-contacts-toolbar > form.tvgw-contacts-picker {
  align-items: stretch;
  text-align: left;
}

/* v1.9.6: New/Edit contact: align the Remove action with the input and
   classification control rather than the top of the label. Both static and
   dynamically added value/custom rows use the same grid contract. */
.tvgw .tvgw-contact-value-row > label,
.tvgw .tvgw-custom-row > label { min-width: 0; margin: 0; }
.tvgw .tvgw-contact-value-row > label > input,
.tvgw .tvgw-contact-value-row > label > select,
.tvgw .tvgw-custom-row > label > input { box-sizing: border-box; width: 100%; min-width: 0; margin: 0; }
.tvgw .tvgw-contact-value-row > button[data-tv-remove-value],
.tvgw .tvgw-custom-row > button[data-tv-remove-custom] {
  box-sizing: border-box; align-self: end; margin: 0; min-height: 36px;
  white-space: nowrap; justify-self: start;
}
@media (max-width: 680px) {
  .tvgw .tvgw-contact-value-row,
  .tvgw .tvgw-custom-row { grid-template-columns: minmax(0, 1fr); }
  .tvgw .tvgw-contact-value-row > button[data-tv-remove-value],
  .tvgw .tvgw-custom-row > button[data-tv-remove-custom] { justify-self: start; }
}

/* v1.9.12: Keep group controls in stable rows. Explicit buttons open separate
   creation/management panels; the triggers disappear while each panel is open.
   Hidden panels are handled by the existing .tvgw [hidden] rule. */
.tvgw .tvgw-group-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  margin: 16px 0 22px;
}
.tvgw .tvgw-group-heading { min-width: 0; }
.tvgw .tvgw-group-heading h3 { margin: 0 0 4px; }
.tvgw .tvgw-group-heading p { color: var(--tvgw-muted); font-size: 12.5px; margin: 0; }
.tvgw .tvgw-group-top {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px 18px;
  min-width: 0;
}
.tvgw .tvgw-group-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  flex: 0 1 350px;
  width: min(350px, 100%);
  margin: 0;
  min-width: 0;
}
.tvgw .tvgw-group-picker label { margin: 0; }
.tvgw .tvgw-group-picker select { display: block; width: 100%; min-width: 0; max-width: 350px; }
.tvgw button.tvgw-group-panel-toggle {
  flex: 0 0 auto;
  align-self: flex-end;
  min-height: 40px;
  padding: 8px 14px;
  white-space: normal;
  text-align: center;
}
.tvgw .tvgw-group-create-area,
.tvgw .tvgw-group-manage {
  min-width: 0;
  border: 1px solid var(--tvgw-border);
  background: var(--tvgw-wash);
  border-radius: 9px;
  padding: 15px 16px;
}
.tvgw .tvgw-group-create,
.tvgw .tvgw-group-rename {
  display: grid;
  grid-template-columns: minmax(0, 320px) auto;
  align-items: end;
  justify-content: start;
  gap: 10px 14px;
  min-width: 0;
  margin: 0;
}
.tvgw .tvgw-group-create label,
.tvgw .tvgw-group-rename label { min-width: 0; margin: 0; }
.tvgw .tvgw-group-create input,
.tvgw .tvgw-group-rename input { width: 100%; min-width: 0; }
.tvgw .tvgw-group-form-actions {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
}
.tvgw .tvgw-group-form-actions > button { flex: 0 0 auto; min-height: 40px; margin: 0; }
.tvgw .tvgw-group-membership {
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid var(--tvgw-border);
  border-radius: 9px;
  background: var(--tvgw-wash);
}
.tvgw .tvgw-group-membership-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 5px 14px;
}
.tvgw .tvgw-group-membership-title strong { font-size: 16px; }
.tvgw .tvgw-group-membership-title span { color: var(--tvgw-muted); font-size: 12.5px; }
.tvgw .tvgw-group-modes { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 13px 0; }
.tvgw .tvgw-group-modes > a.tvgw-edit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin: 0;
  padding: 7px 12px;
}
.tvgw .tvgw-group-modes > a.is-active {
  border-color: var(--tvgw-red);
  background: var(--tvgw-soft-red);
  color: var(--tvgw-red);
  font-weight: 700;
}
.tvgw .tvgw-group-instructions { margin: 0; line-height: 1.55; font-size: 13px; }
.tvgw .tvgw-group-membership .tvgw-warning { margin: 10px 0 0; }
.tvgw .tvgw-group-manage-toggle { display: flex; align-items: center; }
.tvgw .tvgw-group-edit-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  min-width: 0;
}
.tvgw .tvgw-group-delete {
  margin: 0;
  justify-self: start;
  border-top: 1px solid var(--tvgw-border);
  padding-top: 13px;
  width: 100%;
}
.tvgw .tvgw-group-empty {
  margin: 12px 0;
  padding: 14px 16px;
  border: 1px dashed var(--tvgw-border);
  border-radius: 8px;
}
.tvgw .tvgw-bulk-group-label { display: inline-flex; align-items: center; flex-wrap: wrap;
  gap: 7px; font-size: 12px; }
.tvgw .tvgw-bulk-group-label select { min-width: 120px; width: auto; max-width: 240px; }
@media (max-width: 680px) {
  .tvgw .tvgw-group-create,
  .tvgw .tvgw-group-rename { grid-template-columns: minmax(0, 1fr); }
  .tvgw .tvgw-group-create label,
  .tvgw .tvgw-group-rename label { max-width: 350px; }
  .tvgw .tvgw-group-form-actions { justify-content: flex-start; }
}
@media (max-width: 480px) {
  .tvgw .tvgw-group-panel { gap: 12px; }
  .tvgw .tvgw-group-create-area,
  .tvgw .tvgw-group-manage,
  .tvgw .tvgw-group-membership { padding: 12px; }
  .tvgw .tvgw-group-modes { display: grid; grid-template-columns: minmax(0, 1fr); }
  .tvgw .tvgw-group-modes > a.tvgw-edit-button { margin: 0; }
  .tvgw .tvgw-group-form-actions > button { padding: 8px 12px; }
}

/* v1.9.8: Align task start/due date fields and priority consistently. */
.tvgw .tvgw-task-date-priority {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
}
.tvgw .tvgw-task-date-priority > label,
.tvgw .tvgw-task-date-priority > .tvgw-date-field { min-width: 0; margin: 0; }
.tvgw .tvgw-task-date-priority > label { gap: 0; }
.tvgw .tvgw-task-date-priority .tvgw-date-field > label,
.tvgw .tvgw-task-date-priority .tvgw-field-caption {
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; min-height: 2.7em;
  margin: 0 0 6px; line-height: 1.3; font-size: 12.5px; font-weight: 650;
}
.tvgw .tvgw-task-date-priority .tvgw-date-pair { min-height: 40px; }
.tvgw .tvgw-task-date-priority .tvgw-date-pair > input[type="text"] {
  min-width: 0; min-height: 40px; box-sizing: border-box;
}
.tvgw .tvgw-task-date-priority select { min-width: 0; min-height: 40px; margin: 0; box-sizing: border-box; }
@media (max-width: 850px) {
  .tvgw .tvgw-task-date-priority { grid-template-columns: 1fr; }
  .tvgw .tvgw-task-date-priority .tvgw-date-field > label,
  .tvgw .tvgw-task-date-priority .tvgw-field-caption { min-height: 0; }
}

/* Bounded contact-photo editor and secure, locally generated QR dialog. */
.tvgw .tvgw-contact-photo { display: flex; flex-direction: column; gap: 8px; min-width: 0;
  border: 1px solid var(--tvgw-border); border-radius: 7px; margin: 4px 0 12px; padding: 12px; }
.tvgw .tvgw-contact-photo > label { max-width: 520px; margin: 0; }
.tvgw .tvgw-contact-photo input[type="file"] { box-sizing: border-box; }
.tvgw .tvgw-contact-avatar { object-fit: cover; max-width: 110px; max-height: 110px;
  border: 1px solid var(--tvgw-border); border-radius: 9px; background: var(--tvgw-paper); }
.tvgw .tvgw-contact-photo > .tvgw-photo-remove { display: inline-flex; flex-direction: row;
  align-items: center; gap: 8px; }
.tvgw .tvgw-photo-remove > input[type="checkbox"] { width: 16px; height: 16px; min-height: 16px; margin: 0; }
.tvgw dialog.tvgw-qr-dialog { width: min(92vw, 400px); max-width: 400px; max-height: 90vh;
  overflow: auto; margin: auto; border: 1px solid var(--tvgw-border);
  border-radius: 12px; padding: 20px; background: var(--tvgw-paper); color: var(--tvgw-ink); }
.tvgw dialog.tvgw-qr-dialog::backdrop { background: rgb(0 0 0 / .55); }
.tvgw .tvgw-qr-dialog h3 { margin: 0 0 10px; font-size: 17px; }
.tvgw .tvgw-qr-canvas { display: block; width: min(80vw, 320px); height: auto; max-width: 100%;
  aspect-ratio: 1; image-rendering: pixelated; margin: 12px auto; background: white; }
.tvgw .tvgw-qr-dialog p { font-size: 12px; }
.tvgw .tvgw-qr-dialog > button { display: block; margin-left: auto; }
.tvgw .tvgw-contact-actions > .tvgw-qr-trigger { cursor: pointer; }

/* The Tasks sort selector must not occupy a full-width row. */
.tvgw .tvgw-task-sort-form { display: inline-flex; width: auto; max-width: 100%; margin: 8px 0 14px; }
.tvgw .tvgw-task-sort-form > label { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; }
.tvgw .tvgw-task-sort-form select { display: inline-block; width: 155px; min-width: 120px; max-width: 100%; margin: 0; }
/* v1.9.11: Shared compact calendar picker for Calendar and Tasks.
   This rule explicitly beats the older .tvgw-cal-filters form/select rules
   which otherwise make the picker span the available row in some skins. */
.tvgw .tvgw-cal-filters > form.tvgw-filter-form.tvgw-calendar-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 18px 40px;
  row-gap: 5px;
  align-content: end;
  align-items: stretch;
  flex: 0 1 260px;
  width: 260px;
  min-width: 0;
  max-width: min(260px, 100%);
  margin: 0;
}
.tvgw .tvgw-cal-filters > form.tvgw-calendar-picker > label.tvgw-filter-caption {
  display: block;
  min-width: 0;
  width: auto;
  max-width: 100%;
  margin: 0;
  white-space: nowrap;
}
.tvgw .tvgw-cal-filters > form.tvgw-calendar-picker > select#tvgw-filter-calendar {
  display: block;
  box-sizing: border-box;
  grid-column: 1;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 40px;
  margin: 0;
}
@media (max-width: 480px) {
  .tvgw .tvgw-cal-filters > form.tvgw-filter-form.tvgw-calendar-picker {
    flex-basis: min(260px, 100%);
    max-width: 100%;
  }
}

/* v1.9.75: Editor calendar selectors use the same Cyrus sharing/access labels
   as the page-toolbar Showing selector, so allow equal usable width. */
.tvgw label.tvgw-editor-calendar-picker {
  display: flex;
  flex-direction: column;
  align-self: flex-start;
  width: min(100%, 460px);
  max-width: 460px;
  min-width: 0;
}
.tvgw label.tvgw-editor-calendar-picker > select.tvgw-editor-calendar-select {
  display: block;
  width: 100%;
  max-width: 460px;
  min-width: 0;
}
/* These page-toolbar controls must also remain compact inside skin containers
   whose form sizing rules can otherwise make a select stretch to full width. */
.tvgw .tvgw-cal-filters > form.tvgw-calendar-picker {
  flex-grow: 0;
  flex-shrink: 1;
  flex-basis: 460px;
  width: min(100%, 460px);
  max-width: 460px;
}
.tvgw .tvgw-cal-filters > form.tvgw-calendar-picker select.tvgw-calendar-select {
  width: 100%;
  max-width: 460px;
}
/* Explicitly separate selection/group actions from exports. Each row has a
   stable purpose; controls no longer jump between rows as content changes. */
.tvgw .tvgw-contact-bulk-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  justify-content: stretch;
  gap: 0;
  padding: 12px 0;
}
.tvgw .tvgw-contact-bulk-primary,
.tvgw .tvgw-contact-bulk-exports {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 9px 12px;
  min-width: 0;
}
.tvgw .tvgw-contact-bulk-primary {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--tvgw-border);
}
.tvgw .tvgw-contact-bulk-primary strong { font-size: 13px; min-width: 92px; }
.tvgw .tvgw-contact-bulk-exports { padding-top: 10px; }
.tvgw .tvgw-contact-bulk-exports > a.tvgw-contact-bulk-export-all {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 12px;
  white-space: normal;
}
@media (max-width: 480px) {
  .tvgw .tvgw-contact-bulk-primary,
  .tvgw .tvgw-contact-bulk-exports { display: grid; grid-template-columns: minmax(0, 1fr); }
  .tvgw .tvgw-contact-bulk-primary > button,
  .tvgw .tvgw-contact-bulk-exports > button,
  .tvgw .tvgw-contact-bulk-exports > a { width: 100%; justify-content: center; text-align: center; }
}

/* v1.9.13: QR is a secondary action, not a white-text primary button. */
.tvgw .tvgw-contacts-table td .tvgw-contact-actions > button.tvgw-qr-trigger {
  display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center;
  height: 34px; min-height: 34px; margin: 0; padding: 6px 10px;
  line-height: 1.2; font-size: 12px; font-weight: 650; white-space: nowrap;
  color: #6b2940; background: #fff; border-color: var(--tvgw-border);
}
.tvgw .tvgw-contacts-table td .tvgw-contact-actions > button.tvgw-qr-trigger:hover {
  color: #6b2940; background: #f2f5f7;
}
html.dark-mode .tvgw .tvgw-contacts-table td .tvgw-contact-actions > button.tvgw-qr-trigger {
  color: #dce7eb; background: #34434a; border-color: #59666e;
}
html.dark-mode .tvgw .tvgw-contacts-table td .tvgw-contact-actions > button.tvgw-qr-trigger:hover {
  color: #fff; background: #40525a;
}

/* v1.9.13: keep reminder choices compact in appointment and task editors. */
.tvgw .tvgw-editor label.tvgw-reminder-control {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  width: min(100%, 300px); max-width: 300px;
}
.tvgw .tvgw-editor label.tvgw-reminder-control > select {
  box-sizing: border-box; width: 100%; min-width: 0; max-width: 300px;
}
.tvgw .tvgw-editor p.tvgw-muted { max-width: 70ch; margin-top: 4px; }

/* v1.9.27: accessible, collapsed per-contact deletion receipt. */
.tvgw .tvgw-contact-bulk-report { margin: 0.8rem 0 1rem; }
.tvgw .tvgw-contact-bulk-report details { margin-top: 0.65rem; }
.tvgw .tvgw-contact-bulk-report summary { cursor: pointer; font-weight: 600; }
.tvgw .tvgw-contact-bulk-report table td:first-child { white-space: nowrap; }

/* v1.9.31: read-only scheduling details stay inside the Groupware root. */
.tvgw .tvgw-scheduling-summary {
  display: grid;
  grid-template-columns: minmax(95px, 0.32fr) minmax(0, 1fr);
  gap: 7px 14px;
  margin: 12px 0;
}
.tvgw .tvgw-scheduling-summary dt { font-weight: 600; }
.tvgw .tvgw-scheduling-summary dd { margin: 0; overflow-wrap: anywhere; }
.tvgw .tvgw-scheduling-attendees { padding-left: 22px; overflow-wrap: anywhere; }
.tvgw .tvgw-scheduling-attendees li { margin: 0 0 8px; }
@media (max-width: 480px) {
  .tvgw .tvgw-scheduling-summary { grid-template-columns: 1fr; }
}

/* Opt-in in-app reminder surface; scoped to its own unique ID. */
#tvgw-reminders { position: fixed; z-index: 1050; right: 18px; bottom: 18px; font: 14px/1.4 sans-serif; color: #282828; }
#tvgw-reminders .tvgw-reminders-toggle { padding: 8px 12px; border-radius: 6px; background: #2c2c2c; color: #ffffff; border: 1px solid #737373; cursor: pointer; }
#tvgw-reminders .tvgw-reminders-toggle:hover { color: #20a6fb; }
#tvgw-reminders .tvgw-reminders-panel { background: #ffffff; color: #222222; border: 1px solid #888888; box-shadow: 0 3px 12px #0003; padding: 12px; width: min(330px, calc(100vw - 40px)); margin-bottom: 6px; max-height: 55vh; overflow-y: auto; border-radius: 5px; }
#tvgw-reminders .tvgw-reminders-panel[hidden] { display: none; }
#tvgw-reminders .tvgw-reminders-status { margin: 7px 0; }
#tvgw-reminders .tvgw-reminders-list { list-style: none; margin: 0; padding: 0; }
#tvgw-reminders .tvgw-reminders-list li { border-top: 1px solid #dddddd; padding: 7px 0; display: grid; gap: 4px; }
#tvgw-reminders .tvgw-reminders-list li span { font-size: 12px; }
#tvgw-reminders .tvgw-reminders-list li button { justify-self: start; font-size: 12px; cursor: pointer; }
.tvgw .tvgw-reminder-settings { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 14px; font-size: 13px; }
.tvgw .tvgw-reminder-settings small { font-size: 12px; }

/* Optional desktop alert controls; scoped to the Groupware reminder panel. */
#tvgw-reminders .tvgw-reminders-desktop-toggle { display: block; margin-top: 8px; padding: 5px 9px; color: #1d1d1d; background: #f4f4f4; border: 1px solid #888; border-radius: 4px; cursor: pointer; }
#tvgw-reminders .tvgw-reminders-desktop-toggle:hover { background: #e4e4e4; }
#tvgw-reminders .tvgw-reminders-desktop-toggle:focus-visible { outline: 2px solid #1876bf; outline-offset: 2px; }
#tvgw-reminders .tvgw-reminders-desktop-toggle[hidden] { display: none; }
#tvgw-reminders .tvgw-reminders-desktop-status { margin: 6px 0; font-size: 12px; color: #454545; }

/* v1.9.35: self-contained, read-only Help content. No native Roundcube
 * selector or other plugin element may be styled by these declarations. */
.tvgw .tvgw-help-page { max-width: 1080px; margin: 0 auto; padding: 0 0 32px; color: var(--tvgw-ink); }
.tvgw .tvgw-help-page .tvgw-help-lede { border-left: 4px solid var(--tvgw-red); background: var(--tvgw-wash); border-radius: 0 8px 8px 0; padding: 12px 18px; margin-bottom: 22px; color: var(--tvgw-muted); }
.tvgw .tvgw-help-page h1 { font-size: 23px; margin: 12px 0 15px; }
.tvgw .tvgw-help-page h2 { border-top: 1px solid var(--tvgw-border); margin: 32px 0 14px; padding-top: 21px; font-size: 19px; scroll-margin-top: 14px; }
.tvgw .tvgw-help-page h3 { margin: 20px 0 10px; font-size: 15px; scroll-margin-top: 14px; }
.tvgw .tvgw-help-page p { margin: 10px 0 13px; line-height: 1.7; }
.tvgw .tvgw-help-page ul, .tvgw .tvgw-help-page ol { margin: 10px 0 17px; padding-left: 26px; }
.tvgw .tvgw-help-page li { margin: 6px 0; line-height: 1.65; }
.tvgw .tvgw-help-page a { color: var(--tvgw-red); text-decoration: underline; text-underline-offset: 2px; }
.tvgw .tvgw-help-page a:hover { text-decoration-thickness: 2px; }
.tvgw .tvgw-help-page .tvgw-help-index { background: var(--tvgw-paper); border: 1px solid var(--tvgw-border); border-radius: 10px; padding: 14px 20px 14px 40px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
.tvgw .tvgw-help-page .tvgw-help-index li { break-inside: avoid; }
.tvgw .tvgw-help-page .tvgw-help-table-wrap { overflow-x: auto; border: 1px solid var(--tvgw-border); border-radius: 9px; margin: 14px 0 22px; }
.tvgw .tvgw-help-page table { border-collapse: collapse; width: 100%; min-width: 520px; background: var(--tvgw-paper); line-height: 1.55; }
.tvgw .tvgw-help-page th, .tvgw .tvgw-help-page td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--tvgw-border); }
.tvgw .tvgw-help-page th { font-size: 12.5px; background: var(--tvgw-wash); color: var(--tvgw-ink); }
.tvgw .tvgw-help-page tr:last-child td { border-bottom: 0; }
.tvgw .tvgw-help-page code { padding: 2px 5px; border-radius: 4px; background: var(--tvgw-wash); color: var(--tvgw-ink); overflow-wrap: anywhere; font-size: .94em; }
.tvgw .tvgw-help-page .tvgw-help-admin { border-left: 3px solid var(--tvgw-border); padding: 0 12px; }
.tvgw .tvgw-help-page .tvgw-help-logo { padding: 13px 0; }
.tvgw .tvgw-help-page .tvgw-help-wordmark { display: inline-block; font-size: 27px; letter-spacing: -.7px; font-weight: 820; color: var(--tvgw-red); }
.tvgw .tvgw-help-page .tvgw-help-brand-logo { display: block; max-width: min(100%, 340px); max-height: 100px; width: auto; height: auto; object-fit: contain; }
html.dark-mode .tvgw .tvgw-help-page, html.dark-mode .tvgw .tvgw-help-page th, html.dark-mode .tvgw .tvgw-help-page code { color: var(--tvgw-ink); }
html.dark-mode .tvgw .tvgw-help-page .tvgw-help-wordmark { color: #eaa3b5; }
html.dark-mode .tvgw .tvgw-help-page a { color: #eaa3b5; }
@media (max-width: 650px) {
  .tvgw .tvgw-help-page .tvgw-help-index { grid-template-columns: 1fr; padding-left: 34px; }
  .tvgw .tvgw-help-page h1 { font-size: 19px; }
  .tvgw .tvgw-help-page h2 { font-size: 17px; }
  .tvgw .tvgw-help-page th, .tvgw .tvgw-help-page td { padding: 9px 10px; }
}


/* v1.9.36: notification preferences are secondary to Calendar/Tasks content. */
.tvgw .tvgw-notification-preferences {
  margin: 22px 0 10px;
  border: 1px solid var(--tvgw-border);
  border-radius: 8px;
  background: var(--tvgw-paper);
  color: var(--tvgw-ink);
  overflow: hidden;
}
.tvgw .tvgw-notification-preferences > summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px 10px;
  cursor: pointer;
  padding: 9px 13px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--tvgw-ink);
  list-style: none;
}
.tvgw .tvgw-notification-preferences > summary::-webkit-details-marker { display: none; }
.tvgw .tvgw-notification-preferences > summary::before {
  content: '\25b8';
  display: inline-block;
  margin-right: 3px;
  color: var(--tvgw-muted);
}
.tvgw .tvgw-notification-preferences[open] > summary::before { transform: rotate(90deg); }
.tvgw .tvgw-notification-preferences > summary:hover { background: var(--tvgw-wash); }
.tvgw .tvgw-notification-preferences > summary:focus-visible { outline: 2px solid var(--tvgw-focus); outline-offset: -2px; }
.tvgw .tvgw-notification-status { color: var(--tvgw-muted); font-weight: 450; font-size: 12px; }
.tvgw .tvgw-notification-preferences-body {
  border-top: 1px solid var(--tvgw-border);
  padding: 12px 14px 8px;
}
.tvgw .tvgw-notification-explainer { color: var(--tvgw-muted); font-size: 12px; }
.tvgw .tvgw-notification-preferences .tvgw-reminder-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px;
  row-gap: 4px;
  align-items: center;
  padding: 8px 0;
  margin: 0;
  border-top: 1px solid var(--tvgw-border);
}
.tvgw .tvgw-notification-preferences .tvgw-reminder-settings small {
  grid-column: 1 / -1;
  color: var(--tvgw-muted);
  font-weight: 400;
}
.tvgw .tvgw-notification-preferences .tvgw-reminder-settings button { min-height: 31px; padding: 5px 9px; }
/* Logo includes near-black lettering. Keep a pale matte even in dark mode. */
.tvgw .tvgw-help-page .tvgw-help-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  margin: 9px 0 12px;
  padding: 14px 19px;
  background: #f6f7f8;
  border: 1px solid #d8dde2;
  border-radius: 9px;
}
.tvgw .tvgw-help-page .tvgw-help-brand-logo {
  width: 180px;
  max-width: 100%;
  height: auto;
  max-height: none;
}
html.dark-mode .tvgw .tvgw-help-page .tvgw-help-logo {
  background: #eceef1;
  border-color: #57616c;
}
@media (max-width: 540px) {
  .tvgw .tvgw-notification-preferences .tvgw-reminder-settings { grid-template-columns: 1fr; }
  .tvgw .tvgw-notification-preferences .tvgw-reminder-settings button { justify-self: start; }
  .tvgw .tvgw-notification-preferences > summary { grid-template-columns: auto minmax(0, 1fr); }
  .tvgw .tvgw-notification-status { grid-column: 2; font-size: 11px; }
}

/* v1.9.37: stable fixed-position reminder toggle.
 * The open panel changes the container width, but both children remain
 * right-aligned; the toggle's right edge must not jump on open/close. */
#tvgw-reminders {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  box-sizing: border-box;
  max-width: calc(100vw - 36px);
}
#tvgw-reminders .tvgw-reminders-toggle {
  align-self: flex-end;
  flex: 0 0 auto;
  white-space: nowrap;
}
#tvgw-reminders .tvgw-reminders-panel {
  box-sizing: border-box;
  max-width: 100%;
}
/* Calendar connection details are supplementary to the calendar and editor. */
.tvgw .tvgw-calendar-connect { margin: 18px 0 0; }
.tvgw .tvgw-calendar-connect > .tvgw-help { margin-top: 0; }
/* Compact author block: original logo beside, not above, attribution text. */
.tvgw .tvgw-help-page .tvgw-help-attribution {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin: 12px 0 22px;
}
.tvgw .tvgw-help-page .tvgw-help-attribution .tvgw-help-logo {
  box-sizing: border-box;
  display: flex;
  width: 88px;
  max-width: 100%;
  margin: 0;
  padding: 6px;
  border-radius: 7px;
}
.tvgw .tvgw-help-page .tvgw-help-attribution .tvgw-help-brand-logo {
  width: 74px;
  max-width: 100%;
  height: auto;
  max-height: none;
}
.tvgw .tvgw-help-page .tvgw-help-attribution .tvgw-help-wordmark {
  font-size: 15px;
  overflow-wrap: anywhere;
}
.tvgw .tvgw-help-page .tvgw-help-author-text { min-width: 0; }
.tvgw .tvgw-help-page .tvgw-help-author-text p:first-child { margin-top: 0; }
@media (max-width: 390px) {
  .tvgw .tvgw-help-page .tvgw-help-attribution {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 9px;
  }
  .tvgw .tvgw-help-page .tvgw-help-attribution .tvgw-help-logo {
    width: 74px;
    padding: 5px;
  }
  .tvgw .tvgw-help-page .tvgw-help-attribution .tvgw-help-brand-logo { width: 62px; }
}

/* v1.9.38: read-only scheduling Inbox is a secondary Calendar disclosure. */
.tvgw .tvgw-scheduling-inbox { margin-top: 14px; }
.tvgw .tvgw-scheduling-inbox > summary { cursor: pointer; font-weight: 600; }
.tvgw .tvgw-scheduling-inbox-content { padding: 10px 0 2px; }
.tvgw .tvgw-scheduling-table { width: 100%; border-collapse: collapse; }
.tvgw .tvgw-scheduling-table th,
.tvgw .tvgw-scheduling-table td { text-align: left; vertical-align: top; padding: 8px; overflow-wrap: anywhere; border-bottom: 1px solid var(--tvgw-border, #ccc); }

/* TechVallis Mail invitation inspector: never style native Roundcube messages. */
.tvgw-mail-invitation {
  box-sizing: border-box;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
  border-left: 3px solid #912d47;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.tvgw-mail-invitation h3 {
  font-size: 15px;
  margin: 0 0 8px;
  font-weight: 700;
  color: inherit;
}
.tvgw-mail-invitation h4 {
  font-size: 14px;
  margin: 8px 0;
  font-weight: 650;
  color: inherit;
}
.tvgw-mail-invitation .tvgw-mail-invitation-item + .tvgw-mail-invitation-item {
  border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  margin-top: 10px;
  padding-top: 8px;
}
.tvgw-mail-invitation dl {
  display: grid;
  grid-template-columns: minmax(100px, max-content) minmax(0, 1fr);
  gap: 4px 12px;
  margin: 0;
}
.tvgw-mail-invitation dt {
  font-weight: 650;
  margin: 0;
}
.tvgw-mail-invitation dd {
  margin: 0;
  min-width: 0;
}
.tvgw-mail-invitation .tvgw-mail-invitation-note {
  font-size: 12px;
  margin: 10px 0 0;
  opacity: .85;
}
@media (max-width: 480px) {
  .tvgw-mail-invitation { padding: 10px; }
  .tvgw-mail-invitation dl { grid-template-columns: 1fr; gap: 1px; }
  .tvgw-mail-invitation dd { margin-bottom: 6px; }
}

/* v1.9.44: read-only, on-demand duplicate check in Mail. */
.tvgw-mail-invitation .tvgw-mail-uid-form {
  display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-top: 9px;
  padding: 7px 0 2px; border-top: 1px solid #d8d8d8;
}
.tvgw-mail-invitation .tvgw-mail-uid-form button {
  cursor: pointer; border: 1px solid #888; border-radius: 3px;
  padding: 4px 9px; background: #f5f5f5; color: #222; font: inherit;
}
.tvgw-mail-invitation .tvgw-mail-uid-result {
  font-size: 0.92em; overflow-wrap: anywhere;
}

/* v1.9.44: intentional two-step import, separate from the read-only UID action. */
.tvgw-mail-invitation .tvgw-mail-import-form {
  display: flex; flex-wrap: wrap; gap: 7px; align-items: center;
  margin-top: 6px; padding: 6px 0 2px;
}
.tvgw-mail-invitation .tvgw-mail-import-form button {
  cursor: pointer; border: 1px solid #777; border-radius: 3px;
  padding: 5px 10px; background: #ebeff4; color: #222; font: inherit;
}
.tvgw-mail-invitation .tvgw-mail-import-form button:disabled {
  cursor: default; opacity: 0.7;
}
.tvgw-mail-invitation .tvgw-mail-import-options label {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 7px;
}
.tvgw-mail-invitation .tvgw-mail-import-options select {
  max-width: min(100%, 360px); min-width: 135px;
  padding: 4px 6px; border: 1px solid #777; color: #222; background: #fff;
}
.tvgw-mail-invitation .tvgw-mail-import-result {
  font-size: 0.92em; overflow-wrap: anywhere;
}

/* v1.9.45: explicit, two-step RSVP actions from a Mail calendar message. */
.tvgw-mail-invitation .tvgw-mail-rsvp-form {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 9px; padding: 9px 0 3px;
  border-top: 1px solid color-mix(in srgb, currentColor 20%, transparent);
}
.tvgw-mail-invitation .tvgw-mail-rsvp-form label {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px;
}
.tvgw-mail-invitation .tvgw-mail-rsvp-form select {
  min-width: 150px; max-width: 100%; padding: 5px 7px;
  border: 1px solid #727b85; border-radius: 3px;
  color: #222; background: #fff;
}
.tvgw-mail-invitation .tvgw-mail-rsvp-form select:disabled { opacity: .85; }
.tvgw-mail-invitation .tvgw-mail-rsvp-form button {
  border: 1px solid #66737d; border-radius: 3px;
  padding: 5px 10px; background: #e8eef5; color: #222;
  font: inherit; cursor: pointer;
}
.tvgw-mail-invitation .tvgw-mail-rsvp-form button:disabled { cursor: default; opacity: .7; }
.tvgw-mail-invitation .tvgw-mail-rsvp-result { font-size: .92em; overflow-wrap: anywhere; }
html.dark-mode .tvgw-mail-invitation .tvgw-mail-rsvp-form button {
  color: #f0f4f8; background: #324650; border-color: #7a8d96;
}
html.dark-mode .tvgw-mail-invitation .tvgw-mail-rsvp-form select {
  color: #f0f4f8; background: #243740; border-color: #7a8d96;
}

/* v1.9.50: explicit read-only Details link for each calendar appointment.
 * Scoped under Groupware only; never touches Larry Mail splitter layout. */
.tvgw .tvgw-event-details-link {
  display: inline-block; margin-top: 4px; padding: 2px 5px;
  border: 1px solid currentColor; border-radius: 4px;
  background: transparent; color: inherit; font-size: 11px;
  font-weight: 650; text-decoration: none; line-height: 1.3;
}
.tvgw .tvgw-event-details-link:hover,
.tvgw .tvgw-event-details-link:focus-visible {
  color: var(--tvgw-red); background: rgba(127,127,127,.08);
  outline-offset: 2px;
}
.tvgw .tvgw-appointment-inspector { min-width: 0; max-width: 980px; }
.tvgw .tvgw-details-heading { display: flex; justify-content: space-between;
  align-items: flex-start; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.tvgw .tvgw-details-heading h3 { margin: 4px 0 0; overflow-wrap: anywhere; }
.tvgw .tvgw-details-eyebrow { font-size: 11px; font-weight: 750;
  letter-spacing: .04em; text-transform: uppercase; margin: 0; opacity: .73; }
.tvgw .tvgw-details-badges { display:flex; gap:6px; flex-wrap:wrap; }
.tvgw .tvgw-details-badge, .tvgw .tvgw-details-partstat {
  display: inline-block; font-size: 11px; font-weight: 650;
  border: 1px solid var(--tvgw-border); padding: 3px 7px;
  border-radius: 40px; color: inherit; background: rgba(120,120,120,.07);
}
.tvgw .tvgw-details-partstat { margin: 0 5px; }
.tvgw .tvgw-details-note { padding: 10px 14px; margin: 16px 0;
  border: 1px solid var(--tvgw-border); border-radius: 7px;
  overflow-wrap: anywhere; }
.tvgw .tvgw-details-note p { white-space: normal; margin: 6px 0 0; }
.tvgw .tvgw-appointment-inspector code { white-space: normal; overflow-wrap: anywhere; }

/* v1.9.51: clicking an editable calendar card navigates to its real editor.
 * Match the existing Details fragment behavior, without touching Mail layout. */
.tvgw #tvgw-appointment-editor { scroll-margin-top: 18px; }
.tvgw #tvgw-appointment-editor:focus { outline: 2px solid var(--tvgw-focus); outline-offset: 2px; }


/* v1.9.53: narrow calendar week gutter; no loss of event row height. */
.tvgw .tvgw-month-grid.tvgw-with-week-numbers {
  grid-template-columns: 30px repeat(7, minmax(0, 1fr));
}
.tvgw .tvgw-month-grid.tvgw-with-week-numbers .tvgw-month-cell:nth-of-type(7n+7) {
  border-right: 1px solid var(--tvgw-border);
}
.tvgw .tvgw-month-grid.tvgw-with-week-numbers .tvgw-month-cell:nth-child(8n) {
  border-right: 0;
}
.tvgw .tvgw-week-corner,
.tvgw .tvgw-week-gutter {
  min-width: 0;
  text-align: center;
  background: #f5f6f8;
  color: #68727d;
  border-right: 1px solid var(--tvgw-border);
}
.tvgw .tvgw-week-corner {
  padding: 12px 1px;
  font-size: 10px;
  font-weight: 700;
}
.tvgw .tvgw-week-gutter {
  border-top: 1px solid var(--tvgw-border);
  padding-top: 9px;
}
.tvgw .tvgw-week-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  min-height: 24px;
  border-radius: 5px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: #60516e;
  text-decoration: none;
}
.tvgw .tvgw-week-number:hover,
.tvgw .tvgw-week-number:focus-visible {
  background: #e9e2ee;
  color: #533560;
  text-decoration: none;
}
.tvgw .tvgw-header-week-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--tvgw-border);
  background: var(--tvgw-wash);
  color: #61516d;
  border-radius: 6px;
  padding: 3px 7px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  white-space: nowrap;
}
/* Named Cyrus calendars remain distinct even inside bold summary headings. */
.tvgw .tvgw-calendar-name {
  font-style: italic;
  font-weight: 600;
  color: #7b344f;
  overflow-wrap: anywhere;
}
.tvgw .tvgw-week-toggle {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 12px 0 5px;
  font-size: 13px;
}
.tvgw .tvgw-week-toggle input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  margin: 0;
}
.tvgw .tvgw-week-help {
  color: var(--tvgw-muted);
  font-size: 12px;
}
/* The Scheduling Inbox disclosure is a card, like other calendar panels. */
.tvgw .tvgw-scheduling-inbox { background: var(--tvgw-paper); }
html.dark-mode .tvgw .tvgw-week-corner,
html.dark-mode .tvgw .tvgw-week-gutter { background: #34434b; color: #c4d2d9; }
html.dark-mode .tvgw .tvgw-week-number { color: #e1c5ed; }
html.dark-mode .tvgw .tvgw-week-number:hover,
html.dark-mode .tvgw .tvgw-week-number:focus-visible { background: #50415c; color: #fff; }
html.dark-mode .tvgw .tvgw-header-week-number { background: #34434b; color: #e1c5ed; }
html.dark-mode .tvgw .tvgw-calendar-name { color: #f1acbc; }

/* v1.9.53: calendar display-name-only rename; keep local preferences separate. */
.tvgw .tvgw-calendar-rename { margin: 0; min-width: 0; background: var(--tvgw-paper); }
.tvgw .tvgw-calendar-rename > summary { cursor: pointer; font-weight: 600; }
.tvgw .tvgw-calendar-rename > p { margin: 12px 0 8px; }
.tvgw .tvgw-calendar-rename .tvgw-calendar-rename-form { margin-top: 12px; }
.tvgw .tvgw-calendar-rename input[name="_new_label"] { width: 100%; min-width: 0; max-width: 100%; }
.tvgw .tvgw-calendar-rename .tvgw-rename-status { font-weight: 600; }


/* v1.9.54: compact, theme-aware, single-addressbook server-side rename. */
.tvgw .tvgw-addressbook-rename {
  margin: 12px 0;
  min-width: 0;
  background: var(--tvgw-paper);
}
.tvgw .tvgw-addressbook-rename > summary { cursor: pointer; font-weight: 600; }
.tvgw .tvgw-addressbook-rename > p { margin: 12px 0 8px; }
.tvgw .tvgw-addressbook-rename .tvgw-addressbook-rename-form { margin-top: 12px; }
.tvgw .tvgw-addressbook-rename input[name="_new_label"] { width: 100%; min-width: 0; max-width: 100%; }
.tvgw .tvgw-addressbook-rename .tvgw-rename-status { font-weight: 600; }

/* v1.9.55: explicitly requested, current-user-only DAV permission inspection. */
.tvgw .tvgw-collection-access {
  margin: 12px 0;
  min-width: 0;
  background: var(--tvgw-paper);
}
.tvgw .tvgw-collection-access > summary { cursor: pointer; font-weight: 600; }
.tvgw .tvgw-collection-access p { margin: 10px 0; }
.tvgw .tvgw-collection-access .tvgw-table-scroll { max-width: 100%; overflow-x: auto; }
.tvgw .tvgw-collection-access .tvgw-permissions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tvgw .tvgw-permissions-table th,
.tvgw .tvgw-permissions-table td {
  border-bottom: 1px solid var(--tvgw-border);
  padding: 8px 10px;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.tvgw .tvgw-permissions-table th { text-align: left; }
.tvgw .tvgw-permissions-table td { width: 100px; white-space: nowrap; }
.tvgw .tvgw-collection-access small { display: block; margin: 12px 0 6px; color: var(--tvgw-muted); }


/* v1.9.56: opt-in owner-managed collection sharing; scoped to Groupware. */
.tvgw .tvgw-sharing {
  background: var(--tvgw-paper, #fff);
  color: var(--tvgw-ink, inherit);
  border: 1px solid var(--tvgw-border, #d0d7de);
  border-radius: 8px;
  margin: 12px 0;
  padding: 9px 12px;
}
.tvgw .tvgw-sharing summary { cursor: pointer; font-weight: 600; }
.tvgw .tvgw-sharing p { margin: 9px 0; }
.tvgw .tvgw-sharing form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin: 12px 0;
}
.tvgw .tvgw-sharing form > label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 215px;
  min-width: 0;
}
.tvgw .tvgw-sharing input[type=email],
.tvgw .tvgw-sharing select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  color: var(--tvgw-ink, inherit);
  background: var(--tvgw-paper, #fff);
  border: 1px solid var(--tvgw-border, #aaa);
  border-radius: 5px;
  padding: 7px 8px;
}
.tvgw .tvgw-sharing .tvgw-sharing-review {
  padding: 10px 12px;
  border: 1px solid var(--tvgw-border, #d0d7de);
  border-radius: 6px;
}
.tvgw .tvgw-sharing .tvgw-share-url {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}
.tvgw .tvgw-sharing .tvgw-permissions-table { min-width: min(100%, 360px); }
@media (max-width: 520px) {
  .tvgw .tvgw-sharing form { display: block; }
  .tvgw .tvgw-sharing form > label { margin: 7px 0; }
}


/* v1.9.59: compact two-field sharing form, and opt-in shared calendar listing. */
.tvgw .tvgw-sharing form.tvgw-sharing-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 215px), 1fr));
  justify-content: start;
  align-items: end;
  gap: 8px 12px;
  max-width: 580px;
}
.tvgw .tvgw-sharing form.tvgw-sharing-form > label {
  flex: none;
  width: 100%;
  margin: 0;
}
.tvgw .tvgw-sharing form.tvgw-sharing-form > button {
  grid-column: 1 / -1;
  justify-self: start;
  width: auto;
}
.tvgw .tvgw-shared-subscriptions {
  min-width: 0;
  margin: 12px 0;
  padding: 9px 12px;
  color: var(--tvgw-ink, inherit);
  background: var(--tvgw-paper, #fff);
  border: 1px solid var(--tvgw-border, #d0d7de);
  border-radius: 8px;
}
.tvgw .tvgw-shared-subscriptions summary { cursor: pointer; font-weight: 600; }
.tvgw .tvgw-shared-subscriptions p { margin: 9px 0; }
.tvgw .tvgw-shared-subscriptions .tvgw-table-scroll { max-width: 100%; overflow-x: auto; }
.tvgw .tvgw-shared-subscriptions .tvgw-permissions-table { width: 100%; }
.tvgw .tvgw-shared-subscriptions td { overflow-wrap: anywhere; }
/* Native invitations use the current user's Cyrus collection, not manual input. */
.tvgw .tvgw-shared-subscriptions form.tvgw-native-invitation-form select {
  max-width: 100%;
  width: 100%;
  background: var(--tvgw-paper, #fff);
  color: var(--tvgw-ink, inherit);
}
.tvgw .tvgw-shared-subscriptions form.tvgw-shared-remove-form { margin: 0; }
.tvgw .tvgw-shared-subscriptions form.tvgw-shared-remove-form > button {
  width: auto;
  white-space: nowrap;
}
.tvgw .tvgw-shared-subscriptions code { overflow-wrap: anywhere; word-break: break-word; }
@media (max-width: 640px) {
  .tvgw .tvgw-sharing form.tvgw-sharing-form {
    grid-template-columns: minmax(0, 1fr);
    max-width: 100%;
  }
  .tvgw .tvgw-sharing form.tvgw-sharing-form > button {
    grid-column: 1;
  }
}

/* v1.9.65: keep subscribed calendar controls visible and Free/Busy actions clear. */
/* v1.9.69: Give the subscription control the same two-track toolbar
   geometry as the select and checkbox. No skin-specific pixel offsets. */
.tvgw .tvgw-cal-filters > .tvgw-subscription-toolbar-action {
  display: grid;
  grid-template-rows: 18px 40px;
  row-gap: 5px;
  align-content: end;
  align-self: flex-end;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
}
.tvgw .tvgw-cal-filters .tvgw-subscription-toolbar-action > .tvgw-manage-subscription {
  display: inline-flex;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-height: 40px;
  height: 40px;
  max-width: 100%;
  padding: 6px 12px;
  margin: 0;
  border: 1px solid var(--tvgw-border);
  border-radius: 7px;
  background: var(--tvgw-paper);
  color: var(--tvgw-ink);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
}
.tvgw .tvgw-cal-filters .tvgw-subscription-toolbar-action > .tvgw-manage-subscription:hover {
  background: var(--tvgw-wash, #f5f7f9);
  text-decoration: none;
}
@media (max-width: 480px) {
  .tvgw .tvgw-cal-filters > .tvgw-subscription-toolbar-action { width: min(100%, 460px); }
}
.tvgw .tvgw-selected-subscription { background: var(--tvgw-wash, #f5f5f5); }
.tvgw .tvgw-freebusy-actions { padding-top: 10px; border-top: 1px solid var(--tvgw-border, #ddd); }
.tvgw .tvgw-freebusy-actions > a { display: inline-flex; margin: 4px 0 10px; }
.tvgw .tvgw-freebusy-existing { margin-top: 8px; }
.tvgw .tvgw-freebusy-existing li { margin: 7px 0; overflow-wrap: anywhere; }
.tvgw .tvgw-invite-existing { margin-top: 16px; border-top: 1px solid var(--tvgw-border, #ddd); padding-top: 12px; }
.tvgw .tvgw-invite-existing button { max-width: 100%; white-space: normal; }

.tvgw #tvgw-new-appointment-editor { scroll-margin-top: 18px; }

/* v1.9.70: event title/entire card opens Details. Compact, explicit
   Edit/Delete actions occupy the first (time) line in Month cards; the
   appointment title retains the full card width. */
.tvgw .tvgw-month-grid .tvgw-event { position: relative; }
.tvgw .tvgw-month-grid .tvgw-event.tvgw-month-has-actions .tvgw-event-time {
  display: block; box-sizing: border-box; min-height: 26px;
  line-height: 24px; margin-bottom: 1px;
}
.tvgw .tvgw-month-event-controls {
  position: absolute; top: 3px; right: 3px;
  display: inline-flex; align-items: center; justify-content: flex-end;
  gap: 2px; width: auto; height: 26px; padding: 0; margin: 0;
  border: 0; z-index: 2;
}
.tvgw .tvgw-month-event-controls a.tvgw-month-edit-icon,
.tvgw .tvgw-month-event-controls button.tvgw-month-delete-icon {
  box-sizing: border-box; display: inline-flex; align-items: center;
  justify-content: center; flex: 0 0 24px;
  width: 24px; height: 24px; min-width: 24px; min-height: 24px;
  border: 1px solid var(--tvgw-border); border-radius: 5px;
  background: #fff; color: #304c68;
  padding: 3px; margin: 0; line-height: 1; text-decoration: none;
}
.tvgw .tvgw-month-event-controls button.tvgw-month-delete-icon {
  color: #94364b; border-color: #cda4ac;
}
.tvgw .tvgw-month-delete-form {
  display: inline-flex; flex: 0 0 auto; align-items: center;
  margin: 0; padding: 0;
}
.tvgw .tvgw-month-event-controls a.tvgw-month-edit-icon:hover,
.tvgw .tvgw-month-event-controls a.tvgw-month-edit-icon:focus-visible {
  color: #173954; border-color: #476e8a; background: #eaf2fa;
}
.tvgw .tvgw-month-event-controls button.tvgw-month-delete-icon:hover,
.tvgw .tvgw-month-event-controls button.tvgw-month-delete-icon:focus-visible {
  color: #7c2439; border-color: #9f4457; background: #fceef1;
}
html.dark-mode .tvgw .tvgw-month-event-controls a.tvgw-month-edit-icon {
  color: #cce8ff; background: #344047; border-color: #5f7d97;
}
html.dark-mode .tvgw .tvgw-month-event-controls button.tvgw-month-delete-icon {
  color: #f5cbd4; background: #344047; border-color: #8e626d;
}
.tvgw .tvgw-event-editor-delete { margin-top: 9px; display: flex; justify-content: flex-end; }
/* Compact and explicitly left-aligned in Elastic, Larry and Classic skins. */
.tvgw .tvgw-create-addressbook { height: auto; min-height: 0; }
.tvgw .tvgw-create-addressbook summary { cursor: pointer; font-weight: 650; }
.tvgw .tvgw-create-addressbook .tvgw-addressbook-create-help {
  max-width: 64ch; margin: 8px 0 10px; padding: 0;
}
.tvgw .tvgw-addressbook-create-form {
  display: flex; flex-direction: column; align-items: flex-start;
  width: 100%; max-width: 420px; margin: 0; padding: 0; gap: 10px;
}
.tvgw .tvgw-addressbook-create-form label {
  flex: 0 1 auto; align-items: flex-start; width: 100%; max-width: 420px;
  min-width: 0; margin: 0; text-align: left;
}
.tvgw .tvgw-addressbook-create-form label input { width: 100%; max-width: 420px; margin: 0; }
.tvgw .tvgw-addressbook-create-form button { align-self: flex-start; flex: 0 0 auto; margin: 0; }
/* Same selection row as Delete selected; destination stays compact. */
.tvgw .tvgw-contact-copy-controls {
  display: inline-flex; align-items: flex-end; flex-wrap: wrap;
  justify-content: flex-start; gap: 7px; min-width: 0;
}
.tvgw .tvgw-contact-copy-controls label {
  display: flex; flex-direction: column; align-items: flex-start;
  margin: 0; gap: 4px; font-size: 12px; min-width: 185px; max-width: 270px;
}
.tvgw .tvgw-contact-copy-controls select { width: min(270px, 100%); min-width: 0; margin: 0; }
.tvgw .tvgw-contact-copy-controls button { margin: 0; min-height: 36px; }
@media (max-width: 480px) {
  .tvgw .tvgw-contact-copy-controls { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; }
  .tvgw .tvgw-contact-copy-controls label { max-width: none; min-width: 0; width: 100%; }
  .tvgw .tvgw-contact-copy-controls select { width: 100%; max-width: none; }
}

/* v1.9.70: the address-book creator is a peer of the other Contacts cards. */
.tvgw .tvgw-main-content > details.tvgw-create-addressbook {
  display: block; box-sizing: border-box; width: 100%;
  margin: 14px 0 18px;
}
.tvgw .tvgw-create-addressbook .tvgw-addressbook-create-help {
  max-width: none; width: auto; margin: 10px 0 12px;
  white-space: normal; overflow-wrap: normal;
}
/* Align Delete, destination selector and Copy by their bottom baseline,
   avoiding vertical centering against a taller, two-line label. */
.tvgw .tvgw-contact-bulk-primary { align-items: flex-end; }
.tvgw .tvgw-contact-bulk-primary > button { box-sizing: border-box; height: 36px; min-height: 36px; margin: 0; }
.tvgw .tvgw-contact-bulk-primary > strong { align-self: flex-end; line-height: 36px; }
.tvgw .tvgw-contact-copy-controls { align-items: flex-end; }
.tvgw .tvgw-contact-copy-controls button { box-sizing: border-box; height: 36px; min-height: 36px; }
@media (max-width: 480px) {
  .tvgw .tvgw-contact-bulk-primary > strong { line-height: 1.4; }
  .tvgw .tvgw-contact-bulk-primary > button { width: 100%; }
}
/* Month time can be 'Continues'; keep it clear of the two action buttons. */
.tvgw .tvgw-month-grid .tvgw-month-has-actions .tvgw-event-time {
  width: calc(100% - 54px);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}

/* v1.9.71 — Consistent editor actions, management disclosure and transfer. */
.tvgw .tvgw-editor .tvgw-form-actions {
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.tvgw .tvgw-editor .tvgw-form-actions > button.tvgw-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin: 0;
  padding: 8px 14px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}
/* The deletion form holds only CSRF and ETag data; its visible button is
   associated by HTML5 form= with the editor's unified action row. */
.tvgw .tvgw-event-editor-delete { display: none; }
.tvgw .tvgw-transfer-section {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--tvgw-border);
}
.tvgw .tvgw-transfer-section h4 { margin: 0 0 6px; }
.tvgw .tvgw-transfer-section p {
  margin: 0 0 12px;
  color: var(--tvgw-muted);
  line-height: 1.55;
}
.tvgw .tvgw-transfer-form {
  display: flex;
  flex-flow: row wrap;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 10px 14px;
}
.tvgw .tvgw-transfer-form > label {
  flex: 1 1 235px;
  min-width: 0;
  max-width: 360px;
  margin: 0;
}
.tvgw .tvgw-transfer-form select {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 5px 0 0;
}
.tvgw .tvgw-transfer-form > .tvgw-form-actions {
  align-self: flex-end;
  margin: 0;
  flex-wrap: wrap;
}
.tvgw .tvgw-manage-addressbooks {
  display: block;
  min-width: 0;
  margin: 20px 0 0;
}
.tvgw .tvgw-manage-addressbooks > summary {
  font-weight: 700;
  cursor: pointer;
}
.tvgw .tvgw-manage-addressbooks > p { margin: 12px 0; }
.tvgw .tvgw-manage-addressbooks > details.tvgw-card,
.tvgw .tvgw-manage-addressbooks > section.tvgw-group-panel {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  margin: 12px 0;
}
.tvgw .tvgw-manage-addressbooks > .tvgw-group-panel {
  padding: 16px;
  border: 1px solid var(--tvgw-border);
  border-radius: 9px;
}
.tvgw .tvgw-manage-addressbooks .tvgw-create-addressbook .tvgw-addressbook-create-help {
  max-width: none;
  white-space: normal;
}
.tvgw .tvgw-group-edit-actions { gap: 10px; }
.tvgw .tvgw-group-edit-actions > form.tvgw-group-rename {
  grid-template-columns: minmax(0, 320px);
}
.tvgw .tvgw-group-edit-actions > form.tvgw-group-delete {
  border: 0;
  padding: 0;
  height: 0;
  overflow: hidden;
}
.tvgw .tvgw-group-unified-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: 8px;
}
.tvgw .tvgw-group-unified-actions > button {
  box-sizing: border-box;
  min-height: 40px;
  margin: 0;
}
@media (max-width: 440px) {
  .tvgw .tvgw-transfer-form > label { flex: 1 1 100%; }
  .tvgw .tvgw-transfer-form > .tvgw-form-actions { width: 100%; }
}

/* v1.9.71: side-effect-free task details, separate editing and deletion. */
.tvgw .tvgw-editor-delete-context { display: none; }
.tvgw .tvgw-task-detail-list { display:grid; grid-template-columns: 7rem minmax(0,1fr); gap:.5rem 1rem; max-width: 55rem; }
.tvgw .tvgw-task-detail-list dt { font-weight: 600; }
.tvgw .tvgw-task-detail-list dd { margin:0; min-width:0; overflow-wrap:anywhere; }
@media(max-width:460px){ .tvgw .tvgw-task-detail-list { grid-template-columns:1fr; gap:.2rem; } .tvgw .tvgw-task-detail-list dd { margin-bottom:.7rem; } }

/* v1.9.72 - explicit, responsive Add controls for Calendars, Tasks and Contacts.
   Native details/summary remains operable with JavaScript disabled. */
.tvgw details.tvgw-create-disclosure {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 16px 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  scroll-margin-top: 18px;
}
.tvgw details.tvgw-create-disclosure > summary.tvgw-create-trigger {
  display: inline-flex;
  list-style: none;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 40px;
  max-width: 100%;
  padding: 9px 15px;
  border: 1px solid var(--tvgw-red);
  border-radius: 7px;
  background: var(--tvgw-red);
  color: #fff;
  font: inherit;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
  user-select: none;
}
.tvgw details.tvgw-create-disclosure > summary.tvgw-create-trigger::-webkit-details-marker { display: none; }
.tvgw details.tvgw-create-disclosure > summary.tvgw-create-trigger::marker { content: ''; }
.tvgw details.tvgw-create-disclosure > summary.tvgw-create-trigger:hover,
.tvgw details.tvgw-create-disclosure[open] > summary.tvgw-create-trigger {
  background: var(--tvgw-red-hover);
  border-color: var(--tvgw-red-hover);
  color: #fff;
}
.tvgw details.tvgw-create-disclosure > summary.tvgw-create-trigger:focus-visible {
  outline: 2px solid var(--tvgw-focus);
  outline-offset: 3px;
}
.tvgw details.tvgw-create-disclosure > section.tvgw-card {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 13px 0 0;
}
.tvgw .tvgw-view-intro { flex-wrap: wrap; }
.tvgw .tvgw-create-shortcut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--tvgw-border);
  border-radius: 7px;
  background: var(--tvgw-paper);
  color: var(--tvgw-ink);
  padding: 8px 14px;
  text-align: center;
  font-weight: 700;
  text-decoration: none;
  scroll-margin-top: 18px;
}
.tvgw .tvgw-create-shortcut:hover { background: var(--tvgw-wash); text-decoration: none; }
/* Avoid an empty half-width column beside Free/Busy when Add is collapsed. */
.tvgw .tvgw-main-content > .tvgw-bottom-panels { grid-template-columns: minmax(0, 1fr); }
.tvgw .tvgw-main-content > .tvgw-bottom-panels > .tvgw-create-disclosure { margin: 0; }
.tvgw .tvgw-main-content > .tvgw-bottom-panels > .tvgw-calendar-scheduling-tools {
  width: 100%;
  max-width: 920px;
}
/* All calendar administration is grouped in one disclosure at the bottom. */
.tvgw .tvgw-manage-calendars {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 20px 0 0;
}
.tvgw .tvgw-manage-calendars > summary {
  font-weight: 700;
  cursor: pointer;
}
.tvgw .tvgw-manage-calendars > p { margin: 12px 0; }
.tvgw .tvgw-calendar-manage-sections {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
  min-width: 0;
}
.tvgw .tvgw-calendar-manage-sections > section.tvgw-card,
.tvgw .tvgw-calendar-manage-sections > details.tvgw-card {
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 0;
}
html.dark-mode .tvgw .tvgw-create-shortcut { color: var(--tvgw-ink); }
html.dark-mode .tvgw details.tvgw-create-disclosure > summary.tvgw-create-trigger { color: #fff; }
@media (max-width: 600px) {
  .tvgw .tvgw-view-intro > div { flex: 1 1 100%; }
  .tvgw .tvgw-create-shortcut { max-width: 100%; }
  .tvgw details.tvgw-create-disclosure > summary.tvgw-create-trigger { max-width: 100%; }
  .tvgw .tvgw-calendar-manage-sections { gap: 10px; }
}


/* v1.9.73 — Modal Add windows. All selectors are scoped to Groupware;
   unsupported browsers retain the v1.9.72 inline <details> fallback.
   Native showModal() provides focus trapping and a true top-layer backdrop. */
.tvgw dialog.tvgw-create-modal {
  box-sizing: border-box;
  width: min(900px, calc(100vw - 32px));
  max-width: 900px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  padding: 0;
  margin: auto;
  border: 1px solid var(--tvgw-border);
  border-radius: 13px;
  background: var(--tvgw-paper);
  color: var(--tvgw-ink);
  box-shadow: 0 24px 70px rgb(0 0 0 / 0.3);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.tvgw dialog.tvgw-create-modal::backdrop {
  background: rgb(8 16 25 / 0.62);
}
.tvgw .tvgw-modal-toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--tvgw-border);
  background: var(--tvgw-paper);
}
.tvgw .tvgw-modal-toolbar > strong {
  display: block;
  min-width: 0;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 750;
  overflow-wrap: anywhere;
}
.tvgw .tvgw-modal-close {
  flex: 0 0 38px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--tvgw-border);
  border-radius: 8px;
  background: var(--tvgw-wash);
  color: var(--tvgw-ink);
  font-size: 25px;
  line-height: 1;
}
.tvgw .tvgw-modal-close:hover { background: var(--tvgw-soft-red); color: var(--tvgw-red); }
.tvgw dialog.tvgw-create-modal > section.tvgw-card {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 20px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.tvgw dialog.tvgw-create-modal > section.tvgw-card > h3:first-child,
.tvgw dialog.tvgw-create-modal > section.tvgw-card > .tvgw-card-heading h3:first-child {
  /* Dialog toolbar already supplies the visible and accessible title. */
  display: none;
}
.tvgw dialog.tvgw-create-modal form,
.tvgw dialog.tvgw-create-modal label,
.tvgw dialog.tvgw-create-modal input,
.tvgw dialog.tvgw-create-modal select,
.tvgw dialog.tvgw-create-modal textarea {
  min-width: 0;
  max-width: 100%;
}
.tvgw dialog.tvgw-create-modal .tvgw-form-row { min-width: 0; }
html.dark-mode .tvgw dialog.tvgw-create-modal {
  color: var(--tvgw-ink);
  background: var(--tvgw-paper);
  border-color: var(--tvgw-border);
}
@media (max-width: 600px) {
  .tvgw dialog.tvgw-create-modal {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 10px;
  }
  .tvgw .tvgw-modal-toolbar { padding: 9px 12px; }
  .tvgw dialog.tvgw-create-modal > section.tvgw-card { padding: 14px 12px 20px; }
  .tvgw dialog.tvgw-create-modal .tvgw-form-actions { flex-wrap: wrap; }
}


/* v1.9.74: calendar actions are the same protected icon controls in all views.
   Preserve the full-card Details link and avoid covering the time label. */
.tvgw .tvgw-week-grid .tvgw-event,
.tvgw .tvgw-day-layout .tvgw-event { position: relative; }
.tvgw .tvgw-week-grid .tvgw-event .tvgw-event-time,
.tvgw .tvgw-day-layout .tvgw-event .tvgw-event-time {
  display: block;
  min-height: 25px;
  padding-right: 59px;
}
.tvgw .tvgw-week-grid .tvgw-event-controls.tvgw-month-event-controls,
.tvgw .tvgw-day-layout .tvgw-event-controls.tvgw-month-event-controls {
  position: absolute;
  top: 3px;
  right: 3px;
  margin: 0;
  border: 0;
  padding: 0;
  z-index: 3;
}
/* The Manage calendars opening defaults remain a compact settings card. */
.tvgw .tvgw-default-calendar-settings { width: 100%; min-width: 0; }
.tvgw .tvgw-default-calendar-settings > p { max-width: 68ch; }
.tvgw .tvgw-default-calendar-settings > form {
  display: flex; flex-direction: column; gap: 10px;
  max-width: 450px; min-width: 0;
}
.tvgw .tvgw-default-calendar-settings select { width: 100%; max-width: 100%; }
.tvgw .tvgw-default-calendar-settings .tvgw-form-actions { justify-content: flex-start; }
.tvgw .tvgw-contact-view { color: var(--tvgw-red); font-weight: 650; }
.tvgw .tvgw-contact-details { max-width: none; overflow-wrap: anywhere; }
.tvgw dialog.tvgw-existing-modal .tvgw-dialog-loading {
  margin: 22px 20px; color: var(--tvgw-muted);
}
.tvgw dialog.tvgw-existing-modal .tvgw-task-detail-list { max-width: none; }
@media (max-width: 600px) {
  .tvgw dialog.tvgw-existing-modal .tvgw-task-detail-list {
    grid-template-columns: 1fr;
  }
}

/* Shading from selected workdays applies to Daily as well as Week/Month. */
.tvgw .tvgw-day-layout.tvgw-nonworking-day > .tvgw-all-day,
.tvgw .tvgw-day-layout.tvgw-nonworking-day > .tvgw-timeline {
  background-color: #f8f3ec;
}
html.dark-mode .tvgw .tvgw-day-layout.tvgw-nonworking-day > .tvgw-all-day,
html.dark-mode .tvgw .tvgw-day-layout.tvgw-nonworking-day > .tvgw-timeline {
  background-color: #31383b;
}

/* v1.9.78: sharing uses the same responsive native dialog as item editors. */
.tvgw dialog.tvgw-sharing-modal > details.tvgw-sharing {
  display: block; width: 100%; max-width: none; margin: 0;
  border: 0; border-radius: 0; box-shadow: none;
}
.tvgw dialog.tvgw-sharing-modal > details.tvgw-sharing > summary { display: none; }
.tvgw dialog.tvgw-sharing-modal .tvgw-sharing-form,
.tvgw dialog.tvgw-sharing-modal .tvgw-sharing-commit { max-width: 100%; }
.tvgw dialog.tvgw-sharing-modal .tvgw-share-url { overflow-wrap: anywhere; }

/* v1.9.81: keep manual Scheduling Inbox review readable without page jumps. */
.tvgw .tvgw-inbox-review { margin-block: 14px; padding: 14px 16px; }
.tvgw .tvgw-inbox-review p { max-width: 78ch; }
.tvgw .tvgw-inbox-review form { max-width: 600px; }
.tvgw .tvgw-inbox-review label { max-width: min(100%, 520px); }
.tvgw .tvgw-inbox-review .tvgw-form-actions { margin-top: 12px; }
.tvgw .tvgw-scheduling-table td:last-child { min-width: 145px; }
@media (max-width: 560px) {
  .tvgw .tvgw-inbox-review { padding: 12px; }
  .tvgw .tvgw-inbox-review .tvgw-form-actions { display: flex; flex-wrap: wrap; }
}
