/* fh-recurring.css v2.3.0 — Recurring expense panel */
.gp-rec-panel { display:flex; flex-direction:column; min-height:300px; }
.gp-rec-toolbar { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 20px; border-bottom:1px solid #e2e8f0; background:#f8fafc; flex-shrink:0; flex-wrap:wrap; }
.gp-rec-toolbar-left,.gp-rec-toolbar-right { display:flex; align-items:center; gap:8px; }
.gp-rec-toolbar label { font-size:13px; color:#64748b; }
.gp-rec-toolbar input[type="month"] { padding:6px 10px; border:1px solid #e2e8f0; border-radius:6px; font-size:13px; font-family:inherit; background:#fff; }
.gp-rec-toolbar input:focus { outline:none; border-color:#4f46e5; box-shadow:0 0 0 3px rgba(79,70,229,.12); }
.gp-rec-view-sel { padding:6px 10px; border:1px solid #e2e8f0; border-radius:6px; font-size:13px; font-family:inherit; background:#fff; color:#0f172a; cursor:pointer; }
.gp-rec-view-sel:focus { outline:none; border-color:#4f46e5; }
.gp-rec-content { flex:1; overflow-y:auto; padding:16px 20px; max-height:440px; }

/* ── Summary cards grid ── */
.gp-rec-summary-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-bottom:16px; }
.gp-rec-scard { background:#f8fafc; border:1px solid #e2e8f0; border-radius:10px; padding:12px 14px; transition:box-shadow .15s; }
.gp-rec-scard:hover { box-shadow:0 2px 8px rgba(0,0,0,.04); }
.gp-rec-sc-label { font-size:11px; font-weight:600; color:#64748b; text-transform:uppercase; letter-spacing:.4px; margin-bottom:4px; }
.gp-rec-sc-value { font-size:18px; font-weight:700; color:#0f172a; }
.gp-rec-sc-value small { font-size:11px; font-weight:400; color:#94a3b8; margin-left:4px; }
.gp-rec-pos { color:#16a34a !important; }
.gp-rec-neg { color:#dc2626 !important; }
.gp-rec-muted { color:#94a3b8; font-size:13px; text-align:center; padding:20px; }

/* ── Section titles ── */
.gp-rec-section-title { font-size:13px; font-weight:600; color:#64748b; text-transform:uppercase; letter-spacing:.4px; margin:14px 0 8px; }

/* ── List body & rows ── */
.gp-rec-list-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; flex-wrap:wrap; gap:8px; }
.gp-rec-list-header h4 { margin:0; font-size:15px; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.gp-rec-list-body { border:1px solid #e2e8f0; border-radius:10px; overflow:hidden; background:#fff; }
.gp-rec-row { display:flex; align-items:center; gap:12px; padding:10px 14px; border-bottom:1px solid #f1f5f9; transition:background .1s; }
.gp-rec-row:last-child { border-bottom:0; }
.gp-rec-row:hover { background:#f8fafc; }
.gp-rec-row-main { flex:1; min-width:0; }
.gp-rec-row-title { font-size:14px; font-weight:500; color:#0f172a; }
.gp-rec-row-meta { font-size:12px; color:#94a3b8; margin-top:2px; display:flex; align-items:center; gap:4px; flex-wrap:wrap; }
.gp-rec-row-amt { font-size:14px; font-weight:700; color:#0f172a; white-space:nowrap; }
.gp-rec-row-actions { display:flex; gap:4px; padding-left:8px; flex-shrink:0; }
.gp-rec-row-actions .gp-uh-icon-btn { background:none; border:0; cursor:pointer; padding:4px 6px; border-radius:6px;
  color:#64748b; font-size:13px; transition:background .15s, color .15s; }
.gp-rec-row-actions .gp-uh-icon-btn:hover { background:#f1f5f9; color:#0f172a; }

/* ── Badges ── */
.gp-rec-badge { display:inline-flex; align-items:center; gap:3px; padding:1px 7px; border-radius:8px;
  font-size:10px; font-weight:600; margin-left:6px; vertical-align:middle; }
.gp-rec-badge-pending { background:#fef3c7; color:#92400e; }
.gp-rec-badge-partial { background:#dbeafe; color:#1e40af; }
.gp-rec-badge-paid { background:#dcfce7; color:#166534; }
.gp-rec-badge-overdue { background:#fef2f2; color:#ef4444; }
.gp-rec-badge-fixed { background:#f3e8ff; color:#7c3aed; }
.gp-rec-badge-consumption { background:#ecfdf5; color:#059669; }
.gp-rec-badge-daily { background:#fff7ed; color:#c2410c; }

/* ── Progress bar ── */
.gp-rec-prog-bar { background:#f1f5f9; height:6px; border-radius:3px; overflow:hidden; margin-top:4px; }
.gp-rec-bar-green { background:#22c55e; height:100%; border-radius:3px; transition:width .4s ease-out; }
.gp-rec-bar-amber { background:#f59e0b; height:100%; border-radius:3px; transition:width .4s ease-out; }
.gp-rec-bar-red { background:#ef4444; height:100%; border-radius:3px; transition:width .4s ease-out; }

/* ── Head management cards ── */
.gp-rec-head-card { border:1px solid #e2e8f0; border-radius:10px; overflow:hidden; margin-bottom:10px; transition:box-shadow .15s; }
.gp-rec-head-card:hover { box-shadow:0 2px 8px rgba(0,0,0,.04); }
.gp-rec-head-top { padding:10px 14px; background:#f8fafc; border-bottom:1px solid #e2e8f0; display:flex; align-items:center; justify-content:space-between; gap:6px; flex-wrap:wrap; }
.gp-rec-head-top h4 { margin:0; font-size:14px; display:flex; align-items:center; gap:6px; }
.gp-rec-head-detail { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; padding:10px 14px; font-size:12px; }
.gp-rec-head-detail small { color:#94a3b8; }
.gp-rec-head-actions { display:flex; gap:6px; padding:0 14px 10px; flex-wrap:wrap; }

/* ── Calendar grid (daily logs) ── */
.gp-rec-cal-wrap { margin-top:10px; }
.gp-rec-cal-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.gp-rec-cal-header h4 { margin:0; font-size:14px; }
.gp-rec-cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:3px; }
.gp-rec-cal-day-label { font-size:10px; font-weight:600; color:#64748b; text-transform:uppercase; text-align:center; padding:4px 0; }
.gp-rec-cal-cell { position:relative; min-height:42px; border:1px solid #e2e8f0; border-radius:6px; padding:3px 4px; font-size:11px;
  cursor:pointer; transition:all .15s; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.gp-rec-cal-cell:hover { border-color:#4f46e5; background:#eef2ff; }
.gp-rec-cal-cell.active { border-color:#4f46e5; background:#eef2ff; box-shadow:0 0 0 2px rgba(79,70,229,.15); }
.gp-rec-cal-cell.absent { background:#fef2f2; border-color:#fca5a5; }
.gp-rec-cal-cell.logged { background:#f0fdf4; border-color:#86efac; }
.gp-rec-cal-cell.empty { background:transparent; border-color:transparent; cursor:default; }
.gp-rec-cal-cell.empty:hover { border-color:transparent; background:transparent; }
.gp-rec-cal-date { font-weight:600; color:#334155; font-size:12px; }
.gp-rec-cal-qty { font-size:10px; color:#059669; font-weight:500; }
.gp-rec-cal-amt { font-size:9px; color:#64748b; }

/* ── Mode toggle (Quick Log / Select Multiple) ── */
.gp-rec-cal-modes { display:flex; gap:6px; margin-bottom:8px; }

/* ── Calendar hint text ── */
.gp-rec-cal-hint { font-size:11px; color:#94a3b8; margin-bottom:8px; display:flex; align-items:center; gap:4px; }
.gp-rec-cal-hint i { font-size:10px; }

/* ── Today marker ── */
.gp-rec-cal-cell.today { border-color:#f59e0b; }
.gp-rec-cal-cell.today .gp-rec-cal-date { color:#d97706; }

/* ── Multi-select: selected state ── */
.gp-rec-cal-cell.selected { border-color:#3b82f6; background:#eff6ff; box-shadow:0 0 0 2px rgba(59,130,246,.2); }
.gp-rec-cal-check { position:absolute; top:1px; right:3px; font-size:9px; color:#3b82f6; font-weight:700; line-height:1; }

/* ── Quick-log animation ── */
.gp-rec-cal-cell.logging { opacity:.55; pointer-events:none; }
.gp-rec-cal-cell.just-logged { animation: gp-rec-flash-green .5s ease; }
@keyframes gp-rec-flash-green { 0%{background:#bbf7d0;border-color:#4ade80;} 100%{background:#f0fdf4;border-color:#86efac;} }
.gp-rec-cal-cell.log-error { animation: gp-rec-flash-red 1s ease; }
@keyframes gp-rec-flash-red { 0%{background:#fecaca;border-color:#f87171;} 100%{background:transparent;border-color:#e2e8f0;} }

/* ── Multi-select action bar ── */
.gp-rec-multi-bar { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 14px;
  margin-bottom:10px; background:#eff6ff; border:1px solid #93c5fd; border-radius:10px; flex-wrap:wrap; }
.gp-rec-multi-bar > span { font-size:13px; font-weight:600; color:#1e40af; }
.gp-rec-multi-actions { display:flex; gap:6px; flex-wrap:wrap; }

/* ── Daily log modal — date navigation strip ── */
.gp-rec-dl-date-nav { display:flex; align-items:center; justify-content:space-between; gap:8px;
  padding:14px 20px; background:linear-gradient(135deg,#f8fafc 0%,#eef2ff 100%); border-bottom:1px solid #e2e8f0; }
.gp-rec-dl-nav-btn { background:#fff; border:1px solid #e2e8f0; border-radius:50%; width:34px; height:34px;
  cursor:pointer; display:flex; align-items:center; justify-content:center; color:#334155; font-size:13px;
  transition:all .15s; flex-shrink:0; box-shadow:0 1px 2px rgba(0,0,0,.04); }
.gp-rec-dl-nav-btn:hover { background:#eef2ff; border-color:#4f46e5; color:#4f46e5; box-shadow:0 2px 6px rgba(79,70,229,.12); }
.gp-rec-dl-nav-btn:active { transform:scale(.93); }
.gp-rec-dl-nav-btn:disabled { opacity:.3; cursor:not-allowed; background:#f8fafc; border-color:#e2e8f0; color:#cbd5e1;
  box-shadow:none; transform:none; }
.gp-rec-dl-date-center { text-align:center; flex:1; min-width:0; }
.gp-rec-dl-date-text { font-size:17px; font-weight:700; color:#0f172a; display:block; line-height:1.3; }
.gp-rec-dl-day-label { font-size:11px; color:#64748b; text-transform:uppercase; letter-spacing:.6px; font-weight:500; }

/* ── Daily log modal — status badge ── */
.gp-rec-dl-status { text-align:center; padding:7px 12px; border-radius:8px; margin:12px 0; font-size:12px; font-weight:600;
  display:flex; align-items:center; justify-content:center; gap:6px; }
.gp-rec-dl-status i { font-size:13px; }
.gp-rec-dl-status-logged { background:#f0fdf4; color:#16a34a; border:1px solid #bbf7d0; }
.gp-rec-dl-status-absent { background:#fef2f2; color:#ef4444; border:1px solid #fecaca; }
.gp-rec-dl-status-pending { background:#f8fafc; color:#94a3b8; border:1px solid #e2e8f0; }

/* ── Daily log modal — form fields ── */
.gp-rec-dl-fields { transition:opacity .15s; }
.gp-rec-dl-fields.disabled { opacity:.4; pointer-events:none; }
.gp-rec-dl-field-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.gp-rec-dl-field { margin-bottom:10px; }
.gp-rec-dl-field label { font-size:11px; font-weight:600; color:#64748b; text-transform:uppercase; letter-spacing:.3px;
  display:block; margin-bottom:4px; }
.gp-rec-dl-field input[type="number"],
.gp-rec-dl-field input[type="text"] { width:100%; padding:9px 11px; border:1px solid #e2e8f0; border-radius:8px;
  font-size:14px; font-family:inherit; color:#0f172a; background:#fff; transition:border-color .15s, box-shadow .15s; box-sizing:border-box; }
.gp-rec-dl-field input:focus { outline:none; border-color:#4f46e5; box-shadow:0 0 0 3px rgba(79,70,229,.1); }

/* ── Daily log modal — amount total ── */
.gp-rec-dl-total { background:linear-gradient(135deg,#f0fdf4 0%,#ecfdf5 100%); border:1px solid #bbf7d0; border-radius:8px;
  padding:8px 14px; margin-bottom:10px; font-size:13px; color:#15803d; text-align:center; font-weight:500; }
.gp-rec-dl-total strong { font-size:17px; font-weight:700; margin-left:4px; }

/* ── Daily log modal — absent row ── */
.gp-rec-dl-absent-row { margin-top:6px; padding:8px 10px; border-radius:8px; border:1px solid #fef2f2; background:#fff;
  transition:background .15s, border-color .15s; }
.gp-rec-dl-absent-row:has(input:checked) { background:#fef2f2; border-color:#fecaca; }
.gp-rec-dl-absent-row label { display:flex; align-items:center; gap:8px; font-size:13px; color:#64748b; cursor:pointer; margin:0; }
.gp-rec-dl-absent-row input[type="checkbox"] { width:16px; height:16px; accent-color:#ef4444; flex-shrink:0; cursor:pointer; }
.gp-rec-dl-absent-row:has(input:checked) label { color:#ef4444; font-weight:500; }

/* ── Daily log entry form (inline below calendar) ── */
.gp-rec-log-form { background:#f8fafc; border:1px solid #e2e8f0; border-radius:10px; padding:12px 14px; margin-top:10px; }
.gp-rec-log-form-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.gp-rec-log-form-title { font-size:13px; font-weight:600; color:#334155; }
.gp-rec-log-form-grid { display:grid; grid-template-columns:1fr 1fr 1fr auto; gap:10px; align-items:end; }
.gp-rec-log-form-grid .gp-uh-form-row { margin-bottom:0; }
.gp-rec-log-form-grid label { font-size:11px; font-weight:600; color:#64748b; display:block; margin-bottom:3px; }
.gp-rec-log-form-grid input { padding:6px 8px; border:1px solid #e2e8f0; border-radius:6px; font-size:13px; width:100%; font-family:inherit; }
.gp-rec-log-form-grid input:focus { outline:none; border-color:#4f46e5; box-shadow:0 0 0 3px rgba(79,70,229,.12); }
.gp-rec-log-absent { display:flex; align-items:center; gap:6px; font-size:12px; margin-top:8px; color:#64748b; }
.gp-rec-log-absent input[type="checkbox"] { width:15px; height:15px; accent-color:#ef4444; }

/* ── Form grids (modals) ── */
.gp-rec-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }

/* ── Table for entries view ── */
.gp-rec-report-tbl { width:100%; border-collapse:collapse; font-size:12px; margin-top:8px; }
.gp-rec-report-tbl th { text-align:left; padding:8px 10px; font-size:10px; color:#64748b; text-transform:uppercase; letter-spacing:.4px; border-bottom:2px solid #e2e8f0; background:#f8fafc; }
.gp-rec-report-tbl td { padding:8px 10px; border-bottom:1px solid #f1f5f9; color:#0f172a; }
.gp-rec-report-tbl tr:last-child td { border-bottom:0; }
.gp-rec-report-tbl tr:hover td { background:#fafbfc; }

/* ── Scrollbar ── */
.gp-rec-content::-webkit-scrollbar { width:5px; }
.gp-rec-content::-webkit-scrollbar-track { background:transparent; }
.gp-rec-content::-webkit-scrollbar-thumb { background:rgba(0,0,0,.1); border-radius:3px; }

/* ── Empty state action ── */
.gp-rec-empty-action { text-align:center; padding:40px 20px; }
.gp-rec-empty-action i { font-size:2em; opacity:.3; display:block; margin-bottom:12px; }

/* ── Type indicator dot ── */
.gp-rec-type-dot { display:inline-block; width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.gp-rec-type-fixed { background:#7c3aed; }
.gp-rec-type-consumption { background:#059669; }
.gp-rec-type-daily { background:#ea580c; }

/* ── Summary drill-down ── */
.gp-rec-type-group { border-bottom:1px solid #f1f5f9; }
.gp-rec-type-group:last-child { border-bottom:none; }
.gp-rec-type-toggle { border-bottom:none !important; }
.gp-rec-type-toggle:hover { background:#f1f5f9; }
.gp-rec-type-items { background:#fafbfc; }
.gp-rec-type-item { background:#fff; border-bottom:1px solid #f1f5f9 !important; font-size:13px; }
.gp-rec-type-item:last-child { border-bottom:none !important; }
.gp-rec-type-item .gp-rec-row-title { font-size:13px; }
.gp-rec-type-item .gp-rec-row-amt { font-size:14px; }
.gp-rec-type-chevron { display:inline-block; color:#94a3b8; }

/* ── Arrears badges & indicators ── */
.gp-rec-arrears-badge { display:inline-block; font-size:10px; font-weight:600; color:#92400e; background:#fef3c7; padding:1px 6px; border-radius:4px; letter-spacing:.3px; text-transform:uppercase; }
.gp-rec-arrears-next-badge { display:inline-block; font-size:10px; font-weight:600; color:#1e40af; background:#dbeafe; padding:1px 6px; border-radius:4px; letter-spacing:.3px; text-transform:uppercase; }
.gp-rec-arrears-summary { background:#fffbeb; border:1px solid #fde68a; border-radius:8px; padding:10px 14px; margin-bottom:12px; font-size:13px; color:#78350f; display:flex; align-items:center; flex-wrap:wrap; gap:4px; }
.gp-rec-arrears-info { background:#fef3c7; border:1px solid #fde68a; border-radius:8px; padding:8px 14px; margin-bottom:10px; font-size:12px; color:#92400e; display:flex; align-items:center; gap:6px; }

@media(max-width:600px) {
  .gp-rec-summary-grid { grid-template-columns:repeat(2,1fr); }
  .gp-rec-form-grid { grid-template-columns:1fr; }
  .gp-rec-toolbar { flex-direction:column; align-items:stretch; }
  .gp-rec-content { max-height:340px; }
  .gp-rec-cal-grid { gap:2px; }
  .gp-rec-cal-cell { min-height:36px; padding:2px; }
  .gp-rec-cal-date { font-size:11px; }
  .gp-rec-cal-qty { font-size:9px; }
  .gp-rec-cal-amt { font-size:8px; }
  .gp-rec-head-detail { grid-template-columns:1fr 1fr; }
  .gp-rec-log-form-grid { grid-template-columns:1fr 1fr; }
  .gp-rec-row-actions { flex-wrap:wrap; }
  .gp-rec-cal-modes { flex-wrap:wrap; }
  .gp-rec-multi-bar { flex-direction:column; align-items:stretch; text-align:center; }
  .gp-rec-multi-actions { justify-content:center; }
}
