.routine-section{border:1px solid #e5eaec;border-radius:18px;background:#fff;padding:22px;color:#1f2937;box-shadow:0 2px 14px rgba(26,52,58,.035)}
.routine-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.routine-heading h2{margin:3px 0;font-size:18px;font-weight:800;line-height:1.3}.routine-eyebrow{margin:0;color:#4e9aa6;font-size:10px;font-weight:800;letter-spacing:.11em}.routine-subtitle{margin:0;color:#819097;font-size:12px}.routine-primary{border:0!important;background:#5ba4af!important;color:#fff!important;font-weight:700!important}.routine-heading button,.routine-form-actions button{min-height:38px;padding:0 13px;border:1px solid #dce4e7;border-radius:9px;background:#fff;color:#3a4c54;font-size:12px;cursor:pointer;white-space:nowrap}.routine-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:18px 0 13px}.routine-month-nav{display:flex;align-items:center;gap:5px;border:1px solid #dce4e7;border-radius:10px;padding:3px;background:#f8fafb}.routine-month-nav button{width:31px;height:30px;border:0;border-radius:7px;background:transparent;color:#566c75;font-size:22px;line-height:1;cursor:pointer}.routine-month-nav button:hover{background:#e8f4f6}.routine-month-nav strong{min-width:115px;color:#27383e;font-size:12px;text-align:center;text-transform:capitalize}.routine-progress{margin-left:auto;color:#537680;font-size:12px;font-weight:700}.routine-filter{display:flex;gap:3px;padding:3px;border-radius:10px;background:#f1f5f6}.routine-filter button{padding:6px 10px;border:0;border-radius:7px;background:transparent;color:#687b82;font-size:11px;cursor:pointer}.routine-filter button.active{background:#fff;color:#256d78;box-shadow:0 1px 4px rgba(30,62,69,.12);font-weight:700}.routine-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.routine-item{min-width:0;padding:13px;border:1px solid #e8edef;border-radius:12px;background:#fff}.routine-item.is-paid{background:#fbfefd;border-color:#dcece5}.routine-item-main{display:flex;align-items:flex-start;gap:10px}.routine-status{flex:none;margin-top:1px;padding:4px 7px;border-radius:99px;background:#fff2e3;color:#9b6126;font-size:10px;font-weight:700}.routine-status.paid{background:#e7f5ed;color:#247148}.routine-item-name{display:flex;flex:1;flex-direction:column;gap:3px;min-width:0}.routine-item-name strong{font-size:12px;line-height:1.35}.routine-item-name span,.routine-item-amount span{color:#849298;font-size:10px;line-height:1.45}.routine-item-amount{display:flex;flex-direction:column;align-items:flex-end;gap:3px;min-width:90px;text-align:right}.routine-item-amount strong{font-size:11px;white-space:nowrap}.routine-item-actions{display:flex;justify-content:flex-end;gap:5px;margin-top:11px}.routine-item-actions button{min-height:29px;padding:4px 9px;border:1px solid #e0e8ea;border-radius:7px;background:#fff;color:#58717a;font-size:10px;font-weight:700;cursor:pointer}.routine-item-actions .routine-pay-button{border-color:#bedee2;background:#eff8f9;color:#367d89}.routine-item-actions button:disabled,.routine-form-actions button:disabled{opacity:.55;cursor:not-allowed}.routine-form{display:grid;gap:12px;margin:13px 0;padding:15px;border:1px solid #cce5e8;border-radius:12px;background:#f8fcfc}.routine-form-heading{display:flex;justify-content:space-between;align-items:center}.routine-form-heading strong{font-size:13px}.routine-form-heading>button{border:0;background:transparent;color:#60727a;font-size:22px;cursor:pointer}.routine-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.routine-form label{display:flex;flex-direction:column;gap:5px;color:#62757b;font-size:11px;font-weight:700}.routine-form :is(input,select){box-sizing:border-box;width:100%;height:38px;padding:7px 9px;border:1px solid #d8e4e7;border-radius:8px;background:#fff;color:#26343a;font:inherit;font-size:12px}.routine-form .routine-checkbox{flex-direction:row;align-items:center}.routine-checkbox input{width:16px;height:16px}.routine-form-actions{display:flex;justify-content:flex-end;gap:7px}.routine-form-actions .routine-danger{margin-right:auto;border-color:#f3cece;color:#b34444}.routine-empty{padding:24px;text-align:center;color:#839299;font-size:12px}.routine-error{padding:10px 12px;border-radius:9px;background:#fff1f1;color:#a52b2b;font-size:12px}.routine-footnote{margin:12px 0 0;color:#92a0a5;font-size:10px;line-height:1.5}
@media(max-width:900px){.routine-list{grid-template-columns:1fr}}
@media(max-width:640px){.routine-section{padding:16px;border-radius:15px}.routine-heading{align-items:flex-start;flex-direction:column}.routine-heading>button{width:100%}.routine-toolbar{gap:8px}.routine-progress{margin-left:0}.routine-filter{width:100%}.routine-filter button{flex:1}.routine-item-main{flex-wrap:wrap}.routine-item-amount{margin-left:auto}.routine-form-grid{grid-template-columns:1fr}.routine-form-actions{flex-wrap:wrap}.routine-form-actions button{flex:1}}
.routine-heading-actions{display:flex;align-items:center;gap:8px}.routine-heading-actions button{min-height:38px;padding:0 13px;border:1px solid #dce4e7;border-radius:9px;background:#f7fafb;color:#46626b;font-size:12px;font-weight:700;cursor:pointer;white-space:nowrap}@media(max-width:640px){.routine-heading-actions{width:100%}.routine-heading-actions button{flex:1}}
.dark .routine-section{background:#1c1c1e;border-color:#303034;color:#f1f5f5}.dark .routine-item,.dark .routine-form{background:#242426;border-color:#393b3e}.dark .routine-item.is-paid{background:#1f2c27}.dark .routine-heading h2,.dark .routine-month-nav strong,.dark .routine-item-name strong{color:#f1f5f5}.dark .routine-month-nav,.dark .routine-filter{background:#2a2c2e;border-color:#3b4143}.dark .routine-filter button.active{background:#39494d;color:#b6e4e9}.dark .routine-heading-actions button,.dark .routine-item-actions button,.dark .routine-form-actions button{background:#303336;border-color:#434b4e;color:#d4e1e4}.dark .routine-form :is(input,select){background:#1c1c1e;border-color:#41494c;color:#f4f7f8}
.routine-item-actions{flex-wrap:wrap}
.routine-form-hint{margin:0;color:#819097;font-size:11px;line-height:1.5}
.routine-section.is-embedded .routine-heading{align-items:center}
.routine-section.is-embedded .routine-heading .routine-subtitle{font-size:13px}
.routine-section.is-embedded{scroll-margin-top:72px}

/* WebKit date controls must shrink with their grid cell instead of widening the form. */
.routine-form,
.routine-form-grid,
.routine-form label {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.routine-form :is(input:not([type="checkbox"]), select) {
  display: block;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  margin: 0;
  text-align: left;
}
.routine-form input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  min-width: 0 !important;
}
.routine-form input[type="date"]::-webkit-datetime-edit { min-width: 0; padding: 0; }
.routine-form input[type="date"]::-webkit-date-and-time-value { min-height: 1.25em; text-align: left; }
@media (max-width: 640px) {
  .routine-form-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .routine-form label { gap: 7px; font-size: 12px; }
  .routine-form :is(input:not([type="checkbox"]), select) { height: 46px; padding: 10px 12px; font-size: 16px; font-weight: 400; }
  .routine-form-heading { gap: 12px; align-items: flex-start; }
  .routine-form-heading strong { min-width: 0; line-height: 1.5; }
  .routine-form-heading > button { flex: 0 0 32px; min-height: 32px; }
  .routine-form-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .routine-form-actions button { min-width: 0; min-height: 44px; white-space: normal; }
  .routine-form-actions .routine-danger { grid-column: 1 / -1; margin-right: 0; }
}
